/**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function it_throws_exception_when_scalar_entry()
 {
     $fn = T\getElement('name');
     $this->assertSame('Tom', $fn('name'));
 }
示例#2
0
 /** @test */
 public function it_returns_value_of_a_nested_array_entry()
 {
     $fn = T\getElement(['user', 'name']);
     $this->assertSame('Tom', $fn(['user' => ['name' => 'Tom']]));
 }