public function test_toFromAssociativeArray_shouldBeCorrect() { $platformTargeting = new PlatformTargeting(false, false); $array = $platformTargeting->toAssociativeArray(); $this->assertEquals(array(PlatformTargeting::DESKTOP => false, PlatformTargeting::MOBILE => false, PlatformTargeting::VERSION => PlatformTargeting::CURR_VERSION), $array); $newPlatformTargeting = PlatformTargeting::fromAssociativeArray($array); $this->assertFalse($newPlatformTargeting->getMobile()); $this->assertFalse($newPlatformTargeting->getDesktop()); }