Merge "Make sure all functions in Database.php are documented"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / GenericArrayObjectTest.php
index fd9f80d..12c5787 100644 (file)
@@ -24,7 +24,6 @@
  * @ingroup Test
  * @group GenericArrayObject
  *
- * @licence GNU GPL v2+
  * @author Jeroen De Dauw < jeroendedauw@gmail.com >
  */
 abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
@@ -56,7 +55,7 @@ abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
         * @return array
         */
        public function instanceProvider() {
-               $instances = array();
+               $instances = [];
 
                foreach ( $this->elementInstancesProvider() as $elementInstances ) {
                        $instances[] = $this->getNew( $elementInstances[0] );
@@ -72,7 +71,7 @@ abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
         *
         * @return GenericArrayObject
         */
-       protected function getNew( array $elements = array() ) {
+       protected function getNew( array $elements = [] ) {
                $class = $this->getInstanceClass();
 
                return new $class( $elements );
@@ -105,7 +104,7 @@ abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
        public function testIsEmpty( array $elements ) {
                $arrayObject = $this->getNew( $elements );
 
-               $this->assertEquals( $elements === array(), $arrayObject->isEmpty() );
+               $this->assertEquals( $elements === [], $arrayObject->isEmpty() );
        }
 
        /**
@@ -181,7 +180,7 @@ abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
 
                $elementClass = $list->getObjectType();
 
-               foreach ( array( 42, 'foo', array(), new stdClass(), 4.2 ) as $element ) {
+               foreach ( [ 42, 'foo', [], new stdClass(), 4.2 ] as $element ) {
                        $validValid = $element instanceof $elementClass;
 
                        try {
@@ -209,7 +208,7 @@ abstract class GenericArrayObjectTest extends PHPUnit_Framework_TestCase {
         * @covers GenericArrayObject::offsetSet
         */
        public function testOffsetSet( array $elements ) {
-               if ( $elements === array() ) {
+               if ( $elements === [] ) {
                        $this->assertTrue( true );
 
                        return;