File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
tests/Unit/Generator/Definition/Entity Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -89,4 +89,20 @@ public function testGetResultByTableNameAndKeyReturnsEmptyArray(): void
8989 $ result = $ this ->entity ->getResultByTableNameAndKey ('testTable2 ' , 'testKey ' );
9090 self ::assertCount (0 , $ result );
9191 }
92+
93+ public function testGetResultByTableWorks (): void
94+ {
95+ $ results = ['testTable ' => ['testKey ' => ['test ' ]]];
96+ $ this ->entity ->setResults ($ results );
97+ $ result = $ this ->entity ->getResultByTable ('testTable ' );
98+ self ::assertEquals ($ results ['testTable ' ], $ result );
99+ }
100+
101+ public function testGetResultByTableReturnsEmptyArray (): void
102+ {
103+ $ results = ['testTable ' => ['testKey ' => ['test ' ]]];
104+ $ this ->entity ->setResults ($ results );
105+ $ result = $ this ->entity ->getResultByTable ('testTable2 ' );
106+ self ::assertCount (0 , $ result );
107+ }
92108}
You can’t perform that action at this time.
0 commit comments