Move all classes to a sub-namespace

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos
2021-11-30 09:04:53 -03:00
committed by Julius Härtl
parent 24c8b2f4aa
commit f2b6934ac3
16 changed files with 168 additions and 173 deletions

View File

@@ -1,4 +1,4 @@
## Implement import
* Create a new class `lib/service/BoardImport<ImportName>Service.php` where `<ImportName>` is the name of the source system.
* Use the `lib/service/BoardImportTrelloJsonService.php` class as inspiration
* Create a new class `lib/Service/Importer/Systems/<ImportName>Service.php` where `<ImportName>` is the name of the source system.
* Use the `lib/Service/Importer/Systems/TrelloJsonService.php` class as inspiration

View File

@@ -4,211 +4,211 @@
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="464pt" height="830pt"
viewBox="0.00 0.00 463.51 830.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg width="417pt" height="830pt"
viewBox="0.00 0.00 417.01 830.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 826)">
<title>G</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-826 459.512,-826 459.512,4 -4,4"/>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-826 413.012,-826 413.012,4 -4,4"/>
<!-- A0 -->
<g id="node1" class="node">
<title>A0</title>
<polygon fill="#fff8dc" stroke="#000000" points="177.409,-822 81.591,-822 81.591,-766 183.409,-766 183.409,-816 177.409,-822"/>
<polyline fill="none" stroke="#000000" points="177.409,-822 177.409,-816 "/>
<polyline fill="none" stroke="#000000" points="183.409,-816 177.409,-816 "/>
<text text-anchor="middle" x="132.5" y="-809" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Classes used on</text>
<text text-anchor="middle" x="132.5" y="-797" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">board import.</text>
<text text-anchor="middle" x="132.5" y="-785" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Methods just to</text>
<text text-anchor="middle" x="132.5" y="-773" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">illustrate.</text>
<polygon fill="#fff8dc" stroke="#000000" points="165.909,-822 70.091,-822 70.091,-766 171.909,-766 171.909,-816 165.909,-822"/>
<polyline fill="none" stroke="#000000" points="165.909,-822 165.909,-816 "/>
<polyline fill="none" stroke="#000000" points="171.909,-816 165.909,-816 "/>
<text text-anchor="middle" x="121" y="-809" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Classes used on</text>
<text text-anchor="middle" x="121" y="-797" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">board import.</text>
<text text-anchor="middle" x="121" y="-785" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Methods just to</text>
<text text-anchor="middle" x="121" y="-773" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">illustrate.</text>
</g>
<!-- A1 -->
<g id="node2" class="node">
<title>A1</title>
<polygon fill="none" stroke="#000000" points="120.2773,-680 34.7227,-680 34.7227,-644 120.2773,-644 120.2773,-680"/>
<text text-anchor="middle" x="77.5" y="-659" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">ApiController</text>
<polygon fill="none" stroke="#000000" points="108.7773,-680 23.2227,-680 23.2227,-644 108.7773,-644 108.7773,-680"/>
<text text-anchor="middle" x="66" y="-659" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">ApiController</text>
</g>
<!-- A2 -->
<g id="node3" class="node">
<title>A2</title>
<polygon fill="none" stroke="#000000" points="11.5,-514 11.5,-546 143.5,-546 143.5,-514 11.5,-514"/>
<text text-anchor="start" x="21.107" y="-527" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportApiController</text>
<polygon fill="none" stroke="#000000" points="11.5,-458 11.5,-514 143.5,-514 143.5,-458 11.5,-458"/>
<text text-anchor="start" x="57.3645" y="-495" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="27.6335" y="-483" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+getAllowedSystems()</text>
<text text-anchor="start" x="31.5185" y="-471" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+getConfigSchema()</text>
<polygon fill="none" stroke="#000000" points="0,-514 0,-546 132,-546 132,-514 0,-514"/>
<text text-anchor="start" x="9.607" y="-527" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportApiController</text>
<polygon fill="none" stroke="#000000" points="0,-458 0,-514 132,-514 132,-458 0,-458"/>
<text text-anchor="start" x="45.8645" y="-495" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="16.1335" y="-483" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+getAllowedSystems()</text>
<text text-anchor="start" x="20.0185" y="-471" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+getConfigSchema()</text>
</g>
<!-- A1&#45;&gt;A2 -->
<g id="edge1" class="edge">
<title>A1&#45;&gt;A2</title>
<path fill="none" stroke="#000000" d="M77.5,-633.6693C77.5,-609.4424 77.5,-574.1663 77.5,-546.2238"/>
<polygon fill="#000000" stroke="#000000" points="77.5,-643.957 73.0001,-633.9569 77.5,-638.957 77.5001,-633.957 77.5001,-633.957 77.5001,-633.957 77.5,-638.957 82.0001,-633.957 77.5,-643.957 77.5,-643.957"/>
<path fill="none" stroke="#000000" d="M66,-633.6693C66,-609.4424 66,-574.1663 66,-546.2238"/>
<polygon fill="#000000" stroke="#000000" points="66,-643.957 61.5001,-633.9569 66,-638.957 66.0001,-633.957 66.0001,-633.957 66.0001,-633.957 66,-638.957 70.5001,-633.957 66,-643.957 66,-643.957"/>
</g>
<!-- A3 -->
<g id="node4" class="node">
<title>A3</title>
<polygon fill="none" stroke="#000000" points="103.5,-364 103.5,-396 211.5,-396 211.5,-364 103.5,-364"/>
<text text-anchor="start" x="113.328" y="-377" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportService</text>
<polygon fill="none" stroke="#000000" points="103.5,-284 103.5,-364 211.5,-364 211.5,-284 103.5,-284"/>
<text text-anchor="start" x="137.3645" y="-345" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="130.4105" y="-333" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+bootstrap()</text>
<text text-anchor="start" x="117.357" y="-321" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+validateSystem()</text>
<text text-anchor="start" x="119.718" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateConfig()</text>
<text text-anchor="start" x="123.607" y="-297" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateData()</text>
<polygon fill="none" stroke="#000000" points="92,-364 92,-396 200,-396 200,-364 92,-364"/>
<text text-anchor="start" x="101.828" y="-377" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportService</text>
<polygon fill="none" stroke="#000000" points="92,-284 92,-364 200,-364 200,-284 92,-284"/>
<text text-anchor="start" x="125.8645" y="-345" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="118.9105" y="-333" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+bootstrap()</text>
<text text-anchor="start" x="105.857" y="-321" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+validateSystem()</text>
<text text-anchor="start" x="108.218" y="-309" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateConfig()</text>
<text text-anchor="start" x="112.107" y="-297" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateData()</text>
</g>
<!-- A2&#45;&gt;A3 -->
<g id="edge2" class="edge">
<title>A2&#45;&gt;A3</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M99.3604,-457.7328C107.3577,-441.5382 116.5823,-422.8583 125.2939,-405.2174"/>
<polygon fill="#000000" stroke="#000000" points="129.7935,-396.1057 129.4004,-407.0646 127.5795,-400.5889 125.3656,-405.072 125.3656,-405.072 125.3656,-405.072 127.5795,-400.5889 121.3308,-403.0795 129.7935,-396.1057 129.7935,-396.1057"/>
<text text-anchor="middle" x="99.8076" y="-434.7378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M87.8604,-457.7328C95.8577,-441.5382 105.0823,-422.8583 113.7939,-405.2174"/>
<polygon fill="#000000" stroke="#000000" points="118.2935,-396.1057 117.9004,-407.0646 116.0795,-400.5889 113.8656,-405.072 113.8656,-405.072 113.8656,-405.072 116.0795,-400.5889 109.8308,-403.0795 118.2935,-396.1057 118.2935,-396.1057"/>
<text text-anchor="middle" x="88.3076" y="-434.7378" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A7 -->
<g id="node8" class="node">
<title>A7</title>
<polygon fill="none" stroke="#000000" points=".5,-196 .5,-228 147.5,-228 147.5,-196 .5,-196"/>
<text text-anchor="start" x="10.1075" y="-209" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportTrelloApiService</text>
<polygon fill="none" stroke="#000000" points=".5,-164 .5,-196 147.5,-196 147.5,-164 .5,-164"/>
<text text-anchor="start" x="44.9655" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+name:string</text>
<polygon fill="none" stroke="#000000" points="37,-196 37,-228 129,-228 129,-196 37,-196"/>
<text text-anchor="start" x="46.612" y="-209" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">TrelloApiService</text>
<polygon fill="none" stroke="#000000" points="37,-164 37,-196 129,-196 129,-164 37,-164"/>
<text text-anchor="start" x="53.9655" y="-177" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+name:string</text>
</g>
<!-- A3&#45;&gt;A7 -->
<g id="edge6" class="edge">
<title>A3&#45;&gt;A7</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M118.1816,-283.9135C108.8174,-268.3662 99.2841,-251.7769 91.3901,-237.2456"/>
<polygon fill="#000000" stroke="#000000" points="86.4575,-228.0253 95.1426,-234.7202 88.8161,-232.4341 91.1747,-236.8429 91.1747,-236.8429 91.1747,-236.8429 88.8161,-232.4341 87.2068,-238.9656 86.4575,-228.0253 86.4575,-228.0253"/>
<text text-anchor="middle" x="101.613" y="-269.7117" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M114.8609,-283.9135C107.8316,-268.5143 100.7854,-252.0928 95.0404,-237.6613"/>
<polygon fill="#000000" stroke="#000000" points="91.2872,-228.0253 99.1098,-235.7102 93.1019,-232.6844 94.9167,-237.3434 94.9167,-237.3434 94.9167,-237.3434 93.1019,-232.6844 90.7235,-238.9767 91.2872,-228.0253 91.2872,-228.0253"/>
<text text-anchor="middle" x="99.6759" y="-267.8975" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A9 -->
<g id="node10" class="node">
<title>A9</title>
<polygon fill="none" stroke="#000000" points="165.5,-202 165.5,-234 319.5,-234 319.5,-202 165.5,-202"/>
<text text-anchor="start" x="175.272" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportTrelloJsonService</text>
<polygon fill="none" stroke="#000000" points="165.5,-158 165.5,-202 319.5,-202 319.5,-158 165.5,-158"/>
<text text-anchor="start" x="213.4655" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+name:string</text>
<text text-anchor="start" x="189.981" y="-171" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#needValidateData:true</text>
<polygon fill="none" stroke="#000000" points="148,-202 148,-234 273,-234 273,-202 148,-202"/>
<text text-anchor="start" x="170.7765" y="-215" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">TrelloJsonService</text>
<polygon fill="none" stroke="#000000" points="148,-158 148,-202 273,-202 273,-158 148,-158"/>
<text text-anchor="start" x="181.4655" y="-183" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+name:string</text>
<text text-anchor="start" x="157.981" y="-171" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#needValidateData:true</text>
</g>
<!-- A3&#45;&gt;A9 -->
<g id="edge9" class="edge">
<title>A3&#45;&gt;A9</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M184.0053,-283.9135C191.7033,-270.4392 200.1928,-256.1822 208.2827,-243.1605"/>
<polygon fill="#000000" stroke="#000000" points="213.8049,-234.3677 212.2972,-245.2295 211.1456,-238.6019 208.4864,-242.8361 208.4864,-242.8361 208.4864,-242.8361 211.1456,-238.6019 204.6756,-240.4428 213.8049,-234.3677 213.8049,-234.3677"/>
<text text-anchor="middle" x="185.6959" y="-260.9851" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M164.3261,-283.9135C170.0039,-270.5688 176.3462,-256.4563 182.4816,-243.5365"/>
<polygon fill="#000000" stroke="#000000" points="186.9002,-234.3677 186.6126,-245.3298 184.7295,-238.872 182.5588,-243.3762 182.5588,-243.3762 182.5588,-243.3762 184.7295,-238.872 178.505,-241.4226 186.9002,-234.3677 186.9002,-234.3677"/>
<text text-anchor="middle" x="163.6874" y="-260.9237" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A10 -->
<g id="node11" class="node">
<title>A10</title>
<polygon fill="#fff8dc" stroke="#000000" points="329.2872,-362 229.7128,-362 229.7128,-318 335.2872,-318 335.2872,-356 329.2872,-362"/>
<polyline fill="none" stroke="#000000" points="329.2872,-362 329.2872,-356 "/>
<polyline fill="none" stroke="#000000" points="335.2872,-356 329.2872,-356 "/>
<text text-anchor="middle" x="282.5" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">validateSystem is</text>
<text text-anchor="middle" x="282.5" y="-337" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">public because is</text>
<text text-anchor="middle" x="282.5" y="-325" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">used on Api.</text>
<polygon fill="#fff8dc" stroke="#000000" points="317.7872,-362 218.2128,-362 218.2128,-318 323.7872,-318 323.7872,-356 317.7872,-362"/>
<polyline fill="none" stroke="#000000" points="317.7872,-362 317.7872,-356 "/>
<polyline fill="none" stroke="#000000" points="323.7872,-356 317.7872,-356 "/>
<text text-anchor="middle" x="271" y="-349" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">validateSystem is</text>
<text text-anchor="middle" x="271" y="-337" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">public because is</text>
<text text-anchor="middle" x="271" y="-325" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">used on Api.</text>
</g>
<!-- A3&#45;&gt;A10 -->
<g id="edge11" class="edge">
<title>A3&#45;&gt;A10</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M211.6992,-340C217.6915,-340 223.6837,-340 229.676,-340"/>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M200.1992,-340C206.1915,-340 212.1837,-340 218.176,-340"/>
</g>
<!-- A4 -->
<g id="node5" class="node">
<title>A4</title>
<polygon fill="none" stroke="#000000" points="275.6131,-812 201.3869,-812 201.3869,-776 275.6131,-776 275.6131,-812"/>
<text text-anchor="middle" x="238.5" y="-791" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Command</text>
<polygon fill="none" stroke="#000000" points="264.1131,-812 189.8869,-812 189.8869,-776 264.1131,-776 264.1131,-812"/>
<text text-anchor="middle" x="227" y="-791" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">Command</text>
</g>
<!-- A5 -->
<g id="node6" class="node">
<title>A5</title>
<polygon fill="none" stroke="#000000" points="159.5,-684 159.5,-716 318.5,-716 318.5,-684 159.5,-684"/>
<text text-anchor="start" x="211.4955" y="-697" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImport</text>
<polygon fill="none" stroke="#000000" points="159.5,-652 159.5,-684 318.5,-684 318.5,-652 159.5,-652"/>
<text text-anchor="start" x="169.407" y="-665" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+boardImportCommandService</text>
<polygon fill="none" stroke="#000000" points="159.5,-608 159.5,-652 318.5,-652 318.5,-608 159.5,-608"/>
<text text-anchor="start" x="212.3305" y="-633" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#configure()</text>
<text text-anchor="start" x="189.26" y="-621" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#execute(input,output)</text>
<polygon fill="none" stroke="#000000" points="148,-684 148,-716 307,-716 307,-684 148,-684"/>
<text text-anchor="start" x="199.9955" y="-697" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImport</text>
<polygon fill="none" stroke="#000000" points="148,-652 148,-684 307,-684 307,-652 148,-652"/>
<text text-anchor="start" x="157.907" y="-665" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+boardImportCommandService</text>
<polygon fill="none" stroke="#000000" points="148,-608 148,-652 307,-652 307,-608 148,-608"/>
<text text-anchor="start" x="200.8305" y="-633" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#configure()</text>
<text text-anchor="start" x="177.76" y="-621" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#execute(input,output)</text>
</g>
<!-- A4&#45;&gt;A5 -->
<g id="edge3" class="edge">
<title>A4&#45;&gt;A5</title>
<path fill="none" stroke="#000000" d="M238.5,-765.6356C238.5,-751.1554 238.5,-733.0451 238.5,-716.0324"/>
<polygon fill="#000000" stroke="#000000" points="238.5,-775.9227 234.0001,-765.9227 238.5,-770.9227 238.5001,-765.9227 238.5001,-765.9227 238.5001,-765.9227 238.5,-770.9227 243.0001,-765.9228 238.5,-775.9227 238.5,-775.9227"/>
<path fill="none" stroke="#000000" d="M227,-765.6356C227,-751.1554 227,-733.0451 227,-716.0324"/>
<polygon fill="#000000" stroke="#000000" points="227,-775.9227 222.5001,-765.9227 227,-770.9227 227.0001,-765.9227 227.0001,-765.9227 227.0001,-765.9227 227,-770.9227 231.5001,-765.9228 227,-775.9227 227,-775.9227"/>
</g>
<!-- A6 -->
<g id="node7" class="node">
<title>A6</title>
<polygon fill="none" stroke="#000000" points="161.5,-526 161.5,-558 315.5,-558 315.5,-526 161.5,-526"/>
<text text-anchor="start" x="171.2715" y="-539" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportCommandService</text>
<polygon fill="none" stroke="#000000" points="161.5,-446 161.5,-526 315.5,-526 315.5,-446 161.5,-446"/>
<text text-anchor="start" x="211.4105" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+bootstrap()</text>
<text text-anchor="start" x="218.3645" y="-495" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="198.357" y="-483" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+validateSystem()</text>
<text text-anchor="start" x="200.718" y="-471" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateConfig()</text>
<text text-anchor="start" x="204.607" y="-459" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateData()</text>
<polygon fill="none" stroke="#000000" points="150,-526 150,-558 304,-558 304,-526 150,-526"/>
<text text-anchor="start" x="159.7715" y="-539" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">BoardImportCommandService</text>
<polygon fill="none" stroke="#000000" points="150,-446 150,-526 304,-526 304,-446 150,-446"/>
<text text-anchor="start" x="199.9105" y="-507" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+bootstrap()</text>
<text text-anchor="start" x="206.8645" y="-495" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+import()</text>
<text text-anchor="start" x="186.857" y="-483" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+validateSystem()</text>
<text text-anchor="start" x="189.218" y="-471" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateConfig()</text>
<text text-anchor="start" x="193.107" y="-459" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#validateData()</text>
</g>
<!-- A5&#45;&gt;A6 -->
<g id="edge4" class="edge">
<title>A5&#45;&gt;A6</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M238.5,-607.8313C238.5,-595.0442 238.5,-581.2707 238.5,-568.0248"/>
<polygon fill="#000000" stroke="#000000" points="238.5,-558.0234 243.0001,-568.0234 238.5,-563.0234 238.5001,-568.0234 238.5001,-568.0234 238.5001,-568.0234 238.5,-563.0234 234.0001,-568.0235 238.5,-558.0234 238.5,-558.0234"/>
<text text-anchor="middle" x="230.0476" y="-586.7051" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M227,-607.8313C227,-595.0442 227,-581.2707 227,-568.0248"/>
<polygon fill="#000000" stroke="#000000" points="227,-558.0234 231.5001,-568.0234 227,-563.0234 227.0001,-568.0234 227.0001,-568.0234 227.0001,-568.0234 227,-563.0234 222.5001,-568.0235 227,-558.0234 227,-558.0234"/>
<text text-anchor="middle" x="218.5476" y="-586.7051" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A6&#45;&gt;A3 -->
<g id="edge5" class="edge">
<title>A6&#45;&gt;A3</title>
<path fill="none" stroke="#000000" d="M210.3975,-445.7949C203.8634,-432.7268 196.8528,-418.7057 190.1417,-405.2834"/>
<polygon fill="#000000" stroke="#000000" points="185.5529,-396.1057 194.05,-403.0375 187.789,-400.5779 190.0251,-405.05 190.0251,-405.05 190.0251,-405.05 187.789,-400.5779 186.0001,-407.0625 185.5529,-396.1057 185.5529,-396.1057"/>
<path fill="none" stroke="#000000" d="M198.8975,-445.7949C192.3634,-432.7268 185.3528,-418.7057 178.6417,-405.2834"/>
<polygon fill="#000000" stroke="#000000" points="174.0529,-396.1057 182.55,-403.0375 176.289,-400.5779 178.5251,-405.05 178.5251,-405.05 178.5251,-405.05 176.289,-400.5779 174.5001,-407.0625 174.0529,-396.1057 174.0529,-396.1057"/>
</g>
<!-- A7&#45;&gt;A3 -->
<g id="edge7" class="edge">
<title>A7&#45;&gt;A3</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M97.9053,-228.0253C106.7908,-241.8914 116.9013,-258.6532 126.2689,-274.9373"/>
<polygon fill="#000000" stroke="#000000" points="131.3842,-283.9135 122.5232,-277.4533 128.9085,-279.5694 126.4329,-275.2253 126.4329,-275.2253 126.4329,-275.2253 128.9085,-279.5694 130.3426,-272.9972 131.3842,-283.9135 131.3842,-283.9135"/>
<text text-anchor="middle" x="114.768" y="-235.7794" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M102.735,-228.0253C109.5347,-241.763 117.1224,-258.3431 124.0627,-274.4849"/>
<polygon fill="#000000" stroke="#000000" points="128.0634,-283.9135 120.0148,-276.4657 126.1104,-279.3107 124.1573,-274.7079 124.1573,-274.7079 124.1573,-274.7079 126.1104,-279.3107 128.2998,-272.9502 128.0634,-283.9135 128.0634,-283.9135"/>
<text text-anchor="middle" x="118.307" y="-237.5757" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A8 -->
<g id="node9" class="node">
<title>A8</title>
<polygon fill="none" stroke="#000000" points="91.5,-64 91.5,-108 224.5,-108 224.5,-64 91.5,-64"/>
<text text-anchor="start" x="128.54" y="-89" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">&lt;&lt;abstract&gt;&gt;</text>
<text text-anchor="start" x="110.4935" y="-77" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">ABoardImportService</text>
<polygon fill="none" stroke="#000000" points="91.5,-32 91.5,-64 224.5,-64 224.5,-32 91.5,-32"/>
<text text-anchor="start" x="103.536" y="-45" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#needValidateData:false</text>
<polygon fill="none" stroke="#000000" points="91.5,0 91.5,-32 224.5,-32 224.5,0 91.5,0"/>
<text text-anchor="start" x="101.177" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+needValidateData():bool</text>
<polygon fill="none" stroke="#000000" points="80,-64 80,-108 213,-108 213,-64 80,-64"/>
<text text-anchor="start" x="117.04" y="-89" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">&lt;&lt;abstract&gt;&gt;</text>
<text text-anchor="start" x="98.9935" y="-77" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">ABoardImportService</text>
<polygon fill="none" stroke="#000000" points="80,-32 80,-64 213,-64 213,-32 80,-32"/>
<text text-anchor="start" x="92.036" y="-45" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">#needValidateData:false</text>
<polygon fill="none" stroke="#000000" points="80,0 80,-32 213,-32 213,0 80,0"/>
<text text-anchor="start" x="89.677" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">+needValidateData():bool</text>
</g>
<!-- A7&#45;&gt;A8 -->
<g id="edge8" class="edge">
<title>A7&#45;&gt;A8</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M92.5609,-163.778C100.7701,-149.9005 110.666,-133.1718 120.2304,-117.0034"/>
<polygon fill="none" stroke="#000000" points="123.418,-118.4891 125.497,-108.1003 117.3932,-114.9251 123.418,-118.4891"/>
<text text-anchor="middle" x="94.5148" y="-140.8737" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">implements</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M97.2957,-163.778C103.3956,-150.029 110.7371,-133.4813 117.8485,-117.4527"/>
<polygon fill="none" stroke="#000000" points="121.1416,-118.6605 121.9978,-108.1003 114.743,-115.8216 121.1416,-118.6605"/>
<text text-anchor="middle" x="96.9205" y="-140.7815" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">implements</text>
</g>
<!-- A9&#45;&gt;A3 -->
<g id="edge10" class="edge">
<title>A9&#45;&gt;A3</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M225.8999,-234.3677C219.0397,-246.9491 210.794,-261.2976 202.4241,-275.2765"/>
<polygon fill="#000000" stroke="#000000" points="197.2079,-283.9135 198.5256,-273.0271 199.7928,-279.6335 202.3777,-275.3535 202.3777,-275.3535 202.3777,-275.3535 199.7928,-279.6335 206.2297,-277.6799 197.2079,-283.9135 197.2079,-283.9135"/>
<text text-anchor="middle" x="224.5929" y="-251.325" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M198.9952,-234.3677C194.0646,-246.7117 188.0483,-260.7568 181.8434,-274.4849"/>
<polygon fill="#000000" stroke="#000000" points="177.5286,-283.9135 177.598,-272.9478 179.6093,-279.367 181.6899,-274.8204 181.6899,-274.8204 181.6899,-274.8204 179.6093,-279.367 185.7818,-276.693 177.5286,-283.9135 177.5286,-283.9135"/>
<text text-anchor="middle" x="200.0654" y="-251.3391" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">uses</text>
</g>
<!-- A9&#45;&gt;A8 -->
<g id="edge13" class="edge">
<title>A9&#45;&gt;A8</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M219.7216,-157.9466C212.1469,-145.2925 203.4984,-130.8444 195.1077,-116.827"/>
<polygon fill="none" stroke="#000000" points="198.0677,-114.9573 189.9285,-108.1747 192.0615,-118.5526 198.0677,-114.9573"/>
<text text-anchor="middle" x="203.1595" y="-143.7351" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">implements</text>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M192.8492,-157.9466C187.2535,-145.5313 180.8796,-131.389 174.6742,-117.6209"/>
<polygon fill="none" stroke="#000000" points="177.7167,-115.8534 170.4168,-108.1747 171.3349,-118.7297 177.7167,-115.8534"/>
<text text-anchor="middle" x="177.6953" y="-141.8944" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">implements</text>
</g>
<!-- A11 -->
<g id="node12" class="node">
<title>A11</title>
<polygon fill="#fff8dc" stroke="#000000" points="449.524,-224 337.476,-224 337.476,-168 455.524,-168 455.524,-218 449.524,-224"/>
<polyline fill="none" stroke="#000000" points="449.524,-224 449.524,-218 "/>
<polyline fill="none" stroke="#000000" points="455.524,-218 449.524,-218 "/>
<text text-anchor="middle" x="396.5" y="-211" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">To create an import</text>
<text text-anchor="middle" x="396.5" y="-199" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">to another system,</text>
<text text-anchor="middle" x="396.5" y="-187" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">create another class</text>
<text text-anchor="middle" x="396.5" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">similar to this.</text>
<polygon fill="#fff8dc" stroke="#000000" points="403.024,-224 290.976,-224 290.976,-168 409.024,-168 409.024,-218 403.024,-224"/>
<polyline fill="none" stroke="#000000" points="403.024,-224 403.024,-218 "/>
<polyline fill="none" stroke="#000000" points="409.024,-218 403.024,-218 "/>
<text text-anchor="middle" x="350" y="-211" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">To create an import</text>
<text text-anchor="middle" x="350" y="-199" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">to another system,</text>
<text text-anchor="middle" x="350" y="-187" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">create another class</text>
<text text-anchor="middle" x="350" y="-175" font-family="Helvetica,sans-Serif" font-size="10.00" fill="#000000">similar to this.</text>
</g>
<!-- A9&#45;&gt;A11 -->
<g id="edge12" class="edge">
<title>A9&#45;&gt;A11</title>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M319.8008,-196C325.693,-196 331.5853,-196 337.4776,-196"/>
<path fill="none" stroke="#000000" stroke-dasharray="5,2" d="M272.6172,-196C278.6627,-196 284.7083,-196 290.7538,-196"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -13,12 +13,12 @@
[BoardImport]uses-.->[BoardImportCommandService|+bootstrap();+import();+validateSystem();#validateConfig();#validateData()]
[BoardImportCommandService]->[BoardImportService]
[BoardImportService]uses-.->[BoardImportTrelloApiService|+name:string]
[BoardImportTrelloApiService]uses-.->[BoardImportService]
[BoardImportTrelloApiService]implements-.-^[<<abstract>> ABoardImportService|#needValidateData:false|+needValidateData():bool]
[BoardImportService]uses-.->[TrelloApiService|+name:string]
[TrelloApiService]uses-.->[BoardImportService]
[TrelloApiService]implements-.-^[<<abstract>> ABoardImportService|#needValidateData:false|+needValidateData():bool]
[BoardImportService]uses-.->[BoardImportTrelloJsonService|+name:string;#needValidateData:true]
[BoardImportTrelloJsonService]uses-.->[BoardImportService]
[BoardImportService]uses-.->[TrelloJsonService|+name:string;#needValidateData:true]
[TrelloJsonService]uses-.->[BoardImportService]
[BoardImportService]-[note: validateSystem is public because is used on Api. {bg:cornsilk}]
[BoardImportTrelloJsonService]-[note: To create an import to another system, create another class similar to this. {bg:cornsilk}]
[BoardImportTrelloJsonService]implements-.-^[<<abstract>> ABoardImportService]
[TrelloJsonService]-[note: To create an import to another system, create another class similar to this. {bg:cornsilk}]
[TrelloJsonService]implements-.-^[<<abstract>> ABoardImportService]

View File

@@ -23,7 +23,7 @@
namespace OCA\Deck\Command;
use OCA\Deck\Service\BoardImportCommandService;
use OCA\Deck\Service\Importer\BoardImportCommandService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;

View File

@@ -23,7 +23,7 @@
namespace OCA\Deck\Controller;
use OCA\Deck\Service\BoardImportService;
use OCA\Deck\Service\Importer\BoardImportService;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;

View File

@@ -21,7 +21,7 @@
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer;
use OCA\Deck\Db\Acl;
use OCA\Deck\Db\Assignment;

View File

@@ -21,7 +21,7 @@
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer;
use OCA\Deck\Exceptions\ConflictException;
use OCA\Deck\NotFoundException;
@@ -80,7 +80,7 @@ class BoardImportCommandService extends BoardImportService {
$config = $this->getInput()->getOption('config');
if (is_string($config)) {
if (!is_file($config)) {
throw new NotFoundException('It\'s not a file.');
throw new NotFoundException('It\'s not a valid config file.');
}
$config = json_decode(file_get_contents($config));
if (!$config instanceof \stdClass) {
@@ -94,6 +94,7 @@ class BoardImportCommandService extends BoardImportService {
$this->getOutput()->writeln('<error>' . $e->getMessage() . '</error>');
$helper = $this->getCommand()->getHelper('question');
$question = new Question(
"<info>You can get more info on https://deck.readthedocs.io/en/latest/User_documentation_en/#6-import-boards</info>\n" .
'Please inform a valid config json file: ',
'config.json'
);

View File

@@ -21,7 +21,7 @@
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer;
use JsonSchema\Constraints\Constraint;
use JsonSchema\Validator;
@@ -163,20 +163,10 @@ class BoardImportService {
public function getAllowedImportSystems(): array {
if (!$this->allowedSystems) {
$allowedSystems = glob(__DIR__ . '/BoardImport*Service.php');
$allowedSystems = array_filter($allowedSystems, function (string $name) {
$name = basename($name);
switch ($name) {
case 'ABoardImportService.php':
case 'BoardImportService.php':
case 'BoardImportCommandService.php':
return false;
}
return true;
});
$allowedSystems = glob(__DIR__ . '/Systems/*Service.php');
$allowedSystems = array_map(function ($filename) {
preg_match('/\/(?<class>BoardImport(?<system>\w+)Service)\.php$/', $filename, $matches);
$className = 'OCA\Deck\Service\\'.$matches['class'];
preg_match('/\/(?<class>(?<system>\w+)Service)\.php$/', $filename, $matches);
$className = 'OCA\Deck\Service\Importer\Systems\\'.$matches['class'];
if (!class_exists($className)) {
/** @psalm-suppress UnresolvableInclude */
require_once $className;

View File

@@ -21,7 +21,7 @@
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer\Systems;
use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
@@ -30,7 +30,7 @@ use OCP\IURLGenerator;
use OCP\IUserManager;
use Psr\Log\LoggerInterface;
class BoardImportTrelloApiService extends BoardImportTrelloJsonService {
class TrelloApiService extends TrelloJsonService {
/** @var string */
public static $name = 'Trello API';
protected $needValidateData = false;

View File

@@ -21,7 +21,7 @@
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer\Systems;
use OC\Comments\Comment;
use OCA\Deck\BadRequestException;
@@ -32,13 +32,14 @@ use OCA\Deck\Db\Board;
use OCA\Deck\Db\Card;
use OCA\Deck\Db\Label;
use OCA\Deck\Db\Stack;
use OCA\Deck\Service\Importer\ABoardImportService;
use OCP\Comments\IComment;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
class BoardImportTrelloJsonService extends ABoardImportService {
class TrelloJsonService extends ABoardImportService {
/** @var string */
public static $name = 'Trello JSON';
/** @var IUserManager */

View File

@@ -23,7 +23,7 @@
namespace OCA\Deck\Command;
use OCA\Deck\Service\BoardImportCommandService;
use OCA\Deck\Service\Importer\BoardImportCommandService;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
@@ -37,7 +37,7 @@ class BoardImportTest extends \Test\TestCase {
public function setUp(): void {
parent::setUp();
$this->boardImportCommandService = $this->createMock(boardImportCommandService::class);
$this->boardImportCommandService = $this->createMock(BoardImportCommandService::class);
$this->boardImport = new BoardImport(
$this->boardImportCommandService
);

View File

@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer;
use OC\Comments\Comment;
use OCA\Deck\Db\Acl;
@@ -35,6 +35,7 @@ use OCA\Deck\Db\Label;
use OCA\Deck\Db\LabelMapper;
use OCA\Deck\Db\Stack;
use OCA\Deck\Db\StackMapper;
use OCA\Deck\Service\Importer\Systems\TrelloJsonService;
use OCP\Comments\ICommentsManager;
use OCP\IDBConnection;
use OCP\IUser;
@@ -62,8 +63,8 @@ class BoardImportServiceTest extends \Test\TestCase {
private $attachmentMapper;
/** @var ICommentsManager|MockObject */
private $commentsManager;
/** @var BoardImportTrelloJsonService|MockObject */
private $importTrelloJsonService;
/** @var TrelloJsonService|MockObject */
private $trelloJsonService;
/** @var BoardImportService|MockObject */
private $boardImportService;
public function setUp(): void {
@@ -90,14 +91,14 @@ class BoardImportServiceTest extends \Test\TestCase {
$this->boardImportService->setSystem('trelloJson');
$data = json_decode(file_get_contents(__DIR__ . '/../../data/data-trelloJson.json'));
$data = json_decode(file_get_contents(__DIR__ . '/../../../data/data-trelloJson.json'));
$this->boardImportService->setData($data);
$configInstance = json_decode(file_get_contents(__DIR__ . '/../../data/config-trelloJson.json'));
$configInstance = json_decode(file_get_contents(__DIR__ . '/../../../data/config-trelloJson.json'));
$this->boardImportService->setConfigInstance($configInstance);
$this->importTrelloJsonService = $this->createMock(BoardImportTrelloJsonService::class);
$this->boardImportService->setImportSystem($this->importTrelloJsonService);
$this->trelloJsonService = $this->createMock(TrelloJsonService::class);
$this->boardImportService->setImportSystem($this->trelloJsonService);
$owner = $this->createMock(IUser::class);
$owner
@@ -125,35 +126,35 @@ class BoardImportServiceTest extends \Test\TestCase {
->expects($this->once())
->method('insert');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getAclList')
->willReturn([new Acl()]);
$this->aclMapper
->expects($this->once())
->method('insert');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getLabels')
->willReturn([new Label()]);
$this->labelMapper
->expects($this->once())
->method('insert');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getStacks')
->willReturn([new Stack()]);
$this->stackMapper
->expects($this->once())
->method('insert');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getCards')
->willReturn([new Card()]);
$this->cardMapper
->expects($this->any())
->method('insert');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getComments')
->willReturn([
'fakecardid' => [new Comment()]
@@ -162,7 +163,7 @@ class BoardImportServiceTest extends \Test\TestCase {
->expects($this->once())
->method('save');
$this->importTrelloJsonService
$this->trelloJsonService
->method('getCardAssignments')
->willReturn([
'fakecardid' => [new Assignment()]

View File

@@ -20,19 +20,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Deck\Service;
namespace OCA\Deck\Service\Importer\Systems;
use OCA\Deck\Service\Importer\BoardImportService;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
class BoardImportTrelloJsonServiceTest extends \Test\TestCase {
/** @var BoardImportTrelloJsonService */
class TrelloJsonServiceTest extends \Test\TestCase {
/** @var TrelloJsonService */
private $service;
/** @var IURLGenerator */
/** @var IURLGenerator|MockObject */
private $urlGenerator;
/** @var IUserManager */
/** @var IUserManager|MockObject */
private $userManager;
/** @var IL10N */
private $l10n;
@@ -40,7 +42,7 @@ class BoardImportTrelloJsonServiceTest extends \Test\TestCase {
$this->userManager = $this->createMock(IUserManager::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->l10n = $this->createMock(IL10N::class);
$this->service = new BoardImportTrelloJsonService(
$this->service = new TrelloJsonService(
$this->userManager,
$this->urlGenerator,
$this->l10n
@@ -128,10 +130,10 @@ class BoardImportTrelloJsonServiceTest extends \Test\TestCase {
public function testGetBoardWithSuccess() {
$importService = \OC::$server->get(BoardImportService::class);
$data = json_decode(file_get_contents(__DIR__ . '/../../data/data-trelloJson.json'));
$data = json_decode(file_get_contents(__DIR__ . '/../../../../data/data-trelloJson.json'));
$importService->setData($data);
$configInstance = json_decode(file_get_contents(__DIR__ . '/../../data/config-trelloJson.json'));
$configInstance = json_decode(file_get_contents(__DIR__ . '/../../../../data/config-trelloJson.json'));
$importService->setConfigInstance($configInstance);
$owner = $this->createMock(IUser::class);

View File

@@ -1,8 +1,8 @@
<?php
/**
* @copyright Copyright (c) 2018 Ryan Fletcher <ryan.fletcher@codepassion.ca>
* @copyright Copyright (c) 2021 Vitor Mattos <vitor@php.rio>
*
* @author Ryan Fletcher <ryan.fletcher@codepassion.ca>
* @author Vitor Mattos <vitor@php.rio>
*
* @license GNU AGPL version 3 or any later version
*
@@ -26,14 +26,14 @@ use OCA\Deck\Db\Board;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\IRequest;
use OCA\Deck\Service\BoardImportService;
use OCA\Deck\Service\Importer\BoardImportService;
class BoardImportApiControllerTest extends \Test\TestCase {
private $appName = 'deck';
private $userId = 'admin';
/** @var BoardImportApiController */
private $controller;
/** @var BoardImportService */
/** @var BoardImportService|MockObject */
private $boardImportService;
public function setUp(): void {