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 6
6
7
7
final class CopyTest extends \PHPUnit_Framework_TestCase
8
8
{
9
- public function testWalkFixedPath ()
9
+ public function testFixedPath ()
10
10
{
11
11
$ copy = (new Copy ('foo->bar ' , ['foo ' => ['bar ' => 'baz ' ]]))
12
12
->setMapper (new Mapper );
13
13
14
14
self ::assertSame ('baz ' , $ copy ([]));
15
15
}
16
16
17
- public function testWalkStrategyPath ()
17
+ public function testStrategyPath ()
18
18
{
19
19
$ copy = (new Copy (new Copy ('foo ' ), ['bar ' => 'baz ' ]))
20
20
->setMapper (new Mapper );
21
21
22
22
self ::assertSame ('baz ' , $ copy (['foo ' => 'bar ' ]));
23
23
}
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
+ }
24
35
}
You can’t perform that action at this time.
0 commit comments