File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
test/Integration/Mapper/Strategy Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 66
77final class CopyTest extends \PHPUnit_Framework_TestCase
88{
9- public function testWalkFixedPath ()
9+ public function testFixedPath ()
1010 {
1111 $ copy = (new Copy ('foo->bar ' , ['foo ' => ['bar ' => 'baz ' ]]))
1212 ->setMapper (new Mapper );
1313
1414 self ::assertSame ('baz ' , $ copy ([]));
1515 }
1616
17- public function testWalkStrategyPath ()
17+ public function testStrategyPath ()
1818 {
1919 $ copy = (new Copy (new Copy ('foo ' ), ['bar ' => 'baz ' ]))
2020 ->setMapper (new Mapper );
2121
2222 self ::assertSame ('baz ' , $ copy (['foo ' => 'bar ' ]));
2323 }
24+
25+ /**
26+ * Tests that null is returned when the data parameter does not resolve to an array type.
27+ */
28+ public function testInvalidData ()
29+ {
30+ $ copy = (new Copy ('foo ' , 'bar ' ))
31+ ->setMapper (new Mapper );
32+
33+ self ::assertNull ($ copy (['foo ' => 'bar ' ]));
34+ }
2435}
You can’t perform that action at this time.
0 commit comments