public function testValue() { $setting = new Setting(); $value = 'Some Value'; $expected = $value; $setting->setValue($value); $actual = $setting->getValue(); $this->assertSame($expected, $actual); }
public function testMagicIsset() { $setting = new Setting(); $setting->setName('key'); $setting->setValue('SomeValue'); $repository = m::mock('Doctrine\\ORM\\EntityRepository'); $repository->shouldReceive('findAll')->andReturn([$setting]); $this->em->shouldReceive('getRepository')->with('OpiferCmsBundle:Setting')->andReturn($repository); $config = new DynamicConfiguration($this->em); $actual = $config->__isset('key'); $this->assertTrue($actual); }