Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
elnebuloso committed Nov 23, 2015
1 parent 4f4ecc7 commit 031eb43
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 52 deletions.
87 changes: 43 additions & 44 deletions tests/src/FlexTest/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
*/
class CollectionTest extends \PHPUnit_Framework_TestCase
{

/**
* @test
*/
public function testConstruct()
{
$collectionData = array(
$collectionData = [
'foo',
'bar'
);
'bar',
];
$totalCount = 2;

$collection = new Collection($collectionData, $totalCount);
Expand All @@ -34,10 +33,10 @@ public function testConstruct()
*/
public function testElements()
{
$collectionData = array(
$collectionData = [
'foo',
'bar'
);
'bar',
];

$collection = new Collection();
$collection->setElements($collectionData);
Expand Down Expand Up @@ -88,9 +87,9 @@ public function testRemoveElement()
$collection->removeElement('bar');

$elements = $collection->getElements();
$expected = array(
'foo' => 'element'
);
$expected = [
'foo' => 'element',
];

$this->assertEquals($expected, $elements);
}
Expand All @@ -111,10 +110,10 @@ public function testTotalCount()
*/
public function testCountable()
{
$collectionData = array(
$collectionData = [
'foo',
'bar'
);
'bar',
];

$collection = new Collection($collectionData);
$this->assertEquals(2, $collection->count());
Expand All @@ -125,10 +124,10 @@ public function testCountable()
*/
public function testArrayAccess()
{
$collectionData = array(
$collectionData = [
'foo',
'bar'
);
'bar',
];

$collection = new Collection($collectionData);

Expand Down Expand Up @@ -156,24 +155,24 @@ public function testToArray()
$object1 = new TestCollection();
$object2 = new TestCollection();

$collectionData = array(
$collectionData = [
$object1,
$object2,
'foo'
);
'foo',
];

$collection = new Collection($collectionData);
$elements = $collection->toArray();

$equals = array(
array(
'nickname' => 'foo'
),
array(
'nickname' => 'foo'
),
'foo'
);
$equals = [
[
'nickname' => 'foo',
],
[
'nickname' => 'foo',
],
'foo',
];

$this->assertEquals($equals, $elements);
}
Expand All @@ -186,21 +185,21 @@ public function testToJson()
$object1 = new TestCollection();
$object2 = new TestCollection();

$collectionData = array(
$collectionData = [
$object1,
$object2,
'foo'
);

$equals = array(
array(
'nickname' => 'foo'
),
array(
'nickname' => 'foo'
),
'foo'
);
'foo',
];

$equals = [
[
'nickname' => 'foo',
],
[
'nickname' => 'foo',
],
'foo',
];
$equals = json_encode($equals);

$collection = new Collection($collectionData);
Expand All @@ -212,11 +211,11 @@ public function testToJson()
*/
public function testIterator()
{
$collectionData = array(
$collectionData = [
'foo',
'bar',
'baz'
);
'baz',
];

$collection = new Collection($collectionData);

Expand Down
8 changes: 4 additions & 4 deletions tests/src/FlexTest/CollectionTest/TestCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

/**
* Class TestCollection
*
* @author Jeff Tunessen <jeff.tunessen@gmail.com>
*/
class TestCollection extends Collection
{

/**
* @return array
*/
public function toArray()
{
return array(
'nickname' => 'foo'
);
return [
'nickname' => 'foo',
];
}
}
5 changes: 2 additions & 3 deletions tests/src/FlexTest/RegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
class RegistryTest extends \PHPUnit_Framework_TestCase
{

/**
* @test
* @expectedException Exception
Expand Down Expand Up @@ -50,7 +49,7 @@ public function testSetInstanceNewInstance()
{
Registry::unsetInstance();

$foo = new Registry(array('bar' => 'barvalue'));
$foo = new Registry(['bar' => 'barvalue']);
Registry::setInstance($foo);
$this->assertEquals('barvalue', Registry::get('bar'));
}
Expand All @@ -65,7 +64,7 @@ public function testSetInstanceHasInstance()
Registry::unsetInstance();
Registry::set('bar', 'barvalue');

$foo = new Registry(array('bar' => 'barvalue'));
$foo = new Registry(['bar' => 'barvalue']);
Registry::setInstance($foo);
}
}
1 change: 0 additions & 1 deletion tests/src/FlexTest/UuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
class UuidTest extends \PHPUnit_Framework_TestCase
{

/**
* c851db2f-f7b2-4e4f-9ea0-343f592f4cb7
*
Expand Down

0 comments on commit 031eb43

Please sign in to comment.