From b81066a2595d093b57c4f27563380ebb028857af Mon Sep 17 00:00:00 2001 From: sikofitt Date: Tue, 19 Jul 2016 15:02:23 -0700 Subject: [PATCH] Formatting --- .php_cs | 2 +- tests/Sikofitt/Tests/ArrayObjectArrayTest.php | 77 +++++++++---------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/.php_cs b/.php_cs index ba86e1e..0fdae0b 100644 --- a/.php_cs +++ b/.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() diff --git a/tests/Sikofitt/Tests/ArrayObjectArrayTest.php b/tests/Sikofitt/Tests/ArrayObjectArrayTest.php index 138bca9..50c3181 100644 --- a/tests/Sikofitt/Tests/ArrayObjectArrayTest.php +++ b/tests/Sikofitt/Tests/ArrayObjectArrayTest.php @@ -1,12 +1,9 @@ - * - * 7/19/16 / 1:58 PM + * (copyleft) R. Eric Wheeler * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,58 +11,56 @@ 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; - private $arrayObjectArray; - private $workingArray; - - public function setUp() { - $this->workingArray = array( - 'this' => 'that', - 'that' => 'this', - 'what' => 'who', + public function setUp() + { + $this->workingArray = array( + 'this' => 'that', + 'that' => 'this', + 'what' => 'who', 'check' => 'out', ); - $this->arrayObjectArray = new ArrayObjectArray($this->workingArray); - - } + $this->arrayObjectArray = new ArrayObjectArray($this->workingArray); + } /** * @coversDefaultClass */ - public function testArrayObjectArrayInstance() { - $this->assertInstanceOf(ArrayObjectArray::class, $this->arrayObjectArray); - $this->assertInstanceOf(\ArrayObject::class, $this->arrayObjectArray); - } - - public function testArrayKeys() + public function testArrayObjectArrayInstance() { - $this->assertEquals(array_keys($this->workingArray), $this->arrayObjectArray->array_keys()); - $this->assertEquals(array_values($this->workingArray), $this->arrayObjectArray->array_values()); - - $this->assertEquals($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->assertCount(4, $this->arrayObjectArray); + $this->assertInstanceOf(ArrayObjectArray::class, $this->arrayObjectArray); + $this->assertInstanceOf(\ArrayObject::class, $this->arrayObjectArray); } + + public function testArrayKeys() + { + $this->assertSame(array_keys($this->workingArray), $this->arrayObjectArray->array_keys()); + $this->assertSame(array_values($this->workingArray), $this->arrayObjectArray->array_values()); + + $this->assertSame($this->workingArray, $this->arrayObjectArray->getArrayCopy()); + $this->assertCount(4, $this->arrayObjectArray); + + $this->arrayObjectArray->offsetUnset('this'); + $this->assertCount(3, $this->arrayObjectArray); + + $this->arrayObjectArray->append(array('this' => 'that')); + $this->assertCount(4, $this->arrayObjectArray); + } + /** * @expectedException \BadMethodCallException */ public function testException() { - $this->arrayObjectArray->error(); + $this->arrayObjectArray->error(); } - }