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:----LGJv/YSSvcSpLwKd1cQV91R7ZTnmVRdSCld40XeHNEWDK110+PG8w2uVsC7kskv9AP3sZltQUz2oe9HkPMxK7pKYD0M3VwSaTMDkgh8WH/nT/3CBhD4Qwm7uzP8syRcJU4hFhxYM8Qg9jaSa4wlUS2h491DLmKFjt+ZjGxbZAnT/kWzx/PihfXYDuJX4UkVV06ZNWcC/OHP3+7Peko0xz9rkZp8qS/hVfOR+fGXnGjtY8vp3rfBk4eWjKmaaj8azbM+6fehZksF70ZcoEqYS/mz7QzdgwKn7yFYdvHYAnuT/TZnVORzt1CzOS9+rIoIABzcUWUsahcDUjAbPNJeEyHFpWvBcbvNYpLhPofoQu9wWc22/25Xjo3boRX+8kMCWWwu0DmArrPoFHcyeW/5QiL4Juq08Q0gpw84N5o72ko2Pt3eZHuusrssHecf6tCouBZ4v0XX1vL04QY7TCuM6iouJK1zI4g0/d/5JIzPBby2QkA1yBa4CwYQZuOSUHfLS1PhSf0DeELepkHFWjZk/PUZ/fKc21cHBzYBBhBA3BSOPwK1/VacO2oE1ANhNKFf65Tyrm8YwE1JtYLgK0Wq2oPVuQ5f16leoIQ7gNefim9nssL+39zSDKeZdtAuKiZVdc9Ll4MG+Vsx3gKAyqg4bQqAtTTJVgn2iF2cX/gNO7qc=----ATTACHMENT:----NTAzNTU2ODU4MDcxMzY4NiA1MDAzNTc5MzY1NzAwMzA1IDc1NTU3NzQ0MTIxMzQ2ODM=