Commit ca3c6623 by Taylor Otwell

added arr tests.

parent 23f167ac
<?php
class ArrTest extends PHPUnit_Framework_TestCase {
public function testReturnsDefaultWhenItemNotPresentInArray()
{
$this->assertNull(System\Arr::get(array(), 'name'));
$this->assertEquals(System\Arr::get(array(), 'name', 'test'), 'test');
$this->assertEquals(System\Arr::get(array(), 'name', function() {return 'test';}), 'test');
}
public function testReturnsItemWhenPresentInArray()
{
$this->assertEquals(System\Arr::get(array('name' => 'test'), 'name'), 'test');
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment