Skip to content

Commit

Permalink
Added tests for the Arr::keys() method
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Oct 17, 2017
1 parent 5992b89 commit b038b11
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/Arr/KeysTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Yetii\Tests\Arr;

use PHPUnit\Framework\TestCase;
use YeTii\General\Arr;

/**
* Class KeysTest
*/
class KeysTest extends TestCase
{
/**
* @var array
*/
public $testData = [
'apples',
'oranges',
'apples',
];

/**
* Test whether it returns an array of the keys
*/
public function testCanGetKeysForArray()
{
$array = new Arr($this->testData);
$result = $array->keys();
$this->assertTrue($result === [0, 1, 2]);
}
}

0 comments on commit b038b11

Please sign in to comment.