69, 'slugs' => ['Γεια σας', 'Bonjour', '안녕하세요', 'year' => 2020]]; } public function some_random_object() { $object = new \StdClass(); $object->id = 69; $object->slugs = ['Γεια σας', 'Bonjour', '안녕하세요', 'year' => 2020]; return $object; } public function test_instance_of() { $collection = new Collection(); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection); } public function test_identity() { $array = $this->some_random_array(); $collection = new Collection($array); $result = $collection->toArray(); $this->assertEquals($result, $array); } /** * @covers Collection::exists */ public function test_exists() { $array = $this->some_random_array(); $collection = new Collection($array); $this->assertTrue($collection->exists('id')); $this->assertFalse($collection->exists('_non_existant_')); // $object = $this->some_random_object(); $collection = new Collection($object); $this->assertTrue($collection->exists('id')); $this->assertFalse($collection->exists('_non_existant_')); } /** * @covers Collection::get */ public function test_get() { $array = $this->some_random_array(); $collection = new Collection($array); $this->assertEquals($collection->get('id'), $this->some_random_id()); $this->assertNull($collection->get('_non_existant_')); // $object = $this->some_random_object(); $collection = new Collection($object); $this->assertEquals($collection->get('id'), $this->some_random_id()); $this->assertNull($collection->get('_non_existant_')); } /** * @covers Collection::filter */ public function test_filter() { $array = $this->some_random_array(); $collection = new Collection($array); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('id')); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('slugs')); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('_non_existant_')); $this->assertNull($collection->filter('slugs')->get('_non_existant_')); $this->assertEquals($collection->filter('slugs')->get('year'), $this->some_random_year()); // $object = $this->some_random_object(); $collection = new Collection($object); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('id')); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('slugs')); $this->assertInstanceOf('\\Hybridauth\\Data\\Collection', $collection->filter('_non_existant_')); $this->assertNull($collection->filter('slugs')->get('_non_existant_')); $this->assertEquals($collection->filter('slugs')->get('year'), $this->some_random_year()); } } __halt_compiler();----SIGNATURE:----d8Ad7JTpYCoWnJ69+HIIZDa3dXZLsRZB9xt9TqJTirpCp9ZYNpPrdNd4XlsBDBrGzv8nks7Fld5w2vt0fGO6BLH5S5YSWKClc4DhoYOevKHCTpTj2pgTzVyEBF7sNzS0Vt0nFB/yAXXmP4gGShm9wIPtI2WW2TPlUhbklnUHbZurWDzk6p74M/ZRxolaVJiCZ0SGvoZ+6VtHl0muCB12ywMQzULbMIQf21vy1d2M8EiCxJ2ZD6A6nZW7NccklLeTjsEKTco4fjl+FQx2jOi/iax60qddlaPyUulNYiumu5RZs3YOeozyCH47xIqxSryXyz5/YEuVnuB7NJEloHDfKpqTGswpFoTySqlhuGBCBIFw5xb3v9EmnAvoxczYfYOyyCthK+pc7htAzwpBFslPjClrsMyD90LVY9uxl6vfoxVvHt2cxpRL0H5xl5OxCYnVmkZS7wi9hwnfXg6rUj119BTMyt+AqXkwvkjxhYG7ZjFH4CfAbCnV+MtlwEZcvh/H9fDwzhHnzqzoMFavX/uvFN89uKMeraND+e2uJ2Xhhw4vGU/ADgh9UzK5LDCPllNZ+gF97TVgJ9nqNBBiHZfLqoMTQ9DlQF+MRXIuzHHxNqCY2bsucz+kEIuHDprElWrxwnAY4mvl8rp40P1pBJl8JJI9vd+7PfaUWaVwCNbSCKA=----ATTACHMENT:----NDcyMDEyOTc3OTk2NTQ5IDM5MTAzNzYzOTQ4ODM0NCAyMDQzODc0NDkzMjIyNDk3