Formatting
This commit is contained in:
parent
2c39931e93
commit
b81066a259
2
.php_cs
2
.php_cs
|
@ -16,7 +16,7 @@ $finder = Symfony\CS\Finder\DefaultFinder::create()
|
|||
->ignoreDotFiles(true)
|
||||
->ignoreVCS(true)
|
||||
->name('*.php')
|
||||
->in(__DIR__ . '/src')
|
||||
->in(__DIR__)
|
||||
;
|
||||
|
||||
return Symfony\CS\Config\Config::create()
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
<?php
|
||||
/**
|
||||
|
||||
/*
|
||||
* This file is part of ArrayObjectArray.
|
||||
*
|
||||
* @file ArrayObjectArrayTest.php
|
||||
*
|
||||
* R. Eric Wheeler <reric@ee.stanford.edu>
|
||||
*
|
||||
* 7/19/16 / 1:58 PM
|
||||
* (copyleft) R. Eric Wheeler <sikofitt@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
|
@ -14,20 +11,18 @@
|
|||
|
||||
namespace Sikofitt\Tests;
|
||||
|
||||
|
||||
use Sikofitt\Utility\ArrayObjectArray;
|
||||
|
||||
/**
|
||||
* Class ArrayObjectArrayTest
|
||||
*
|
||||
* @package Sikofitt\Tests
|
||||
* Class ArrayObjectArrayTest.
|
||||
*/
|
||||
class ArrayObjectArrayTest extends \PHPUnit_Framework_TestCase {
|
||||
|
||||
class ArrayObjectArrayTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $arrayObjectArray;
|
||||
private $workingArray;
|
||||
|
||||
public function setUp() {
|
||||
public function setUp()
|
||||
{
|
||||
$this->workingArray = array(
|
||||
'this' => 'that',
|
||||
'that' => 'this',
|
||||
|
@ -35,31 +30,32 @@ class ArrayObjectArrayTest extends \PHPUnit_Framework_TestCase {
|
|||
'check' => 'out',
|
||||
);
|
||||
$this->arrayObjectArray = new ArrayObjectArray($this->workingArray);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @coversDefaultClass
|
||||
*/
|
||||
public function testArrayObjectArrayInstance() {
|
||||
public function testArrayObjectArrayInstance()
|
||||
{
|
||||
$this->assertInstanceOf(ArrayObjectArray::class, $this->arrayObjectArray);
|
||||
$this->assertInstanceOf(\ArrayObject::class, $this->arrayObjectArray);
|
||||
}
|
||||
|
||||
public function testArrayKeys()
|
||||
{
|
||||
$this->assertEquals(array_keys($this->workingArray), $this->arrayObjectArray->array_keys());
|
||||
$this->assertEquals(array_values($this->workingArray), $this->arrayObjectArray->array_values());
|
||||
$this->assertSame(array_keys($this->workingArray), $this->arrayObjectArray->array_keys());
|
||||
$this->assertSame(array_values($this->workingArray), $this->arrayObjectArray->array_values());
|
||||
|
||||
$this->assertEquals($this->workingArray, $this->arrayObjectArray->getArrayCopy());
|
||||
$this->assertSame($this->workingArray, $this->arrayObjectArray->getArrayCopy());
|
||||
$this->assertCount(4, $this->arrayObjectArray);
|
||||
|
||||
$this->arrayObjectArray->offsetUnset('this');
|
||||
$this->assertCount(3, $this->arrayObjectArray);
|
||||
|
||||
$this->arrayObjectArray->append(['this' => 'that']);
|
||||
$this->arrayObjectArray->append(array('this' => 'that'));
|
||||
$this->assertCount(4, $this->arrayObjectArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \BadMethodCallException
|
||||
*/
|
||||
|
@ -67,5 +63,4 @@ class ArrayObjectArrayTest extends \PHPUnit_Framework_TestCase {
|
|||
{
|
||||
$this->arrayObjectArray->error();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue