Exemplo n.º 1
0
 /** @test */
 public function it_returns_value_of_a_nested_array_entry()
 {
     $fn = T\getEntry(['user', 'name']);
     $this->assertSame('Tom', $fn(['user' => ['name' => 'Tom']]));
 }
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function it_throws_exception_when_scalar_entry()
 {
     $fn = T\getEntry('name');
     $this->assertSame('Tom', $fn('name'));
 }