public function testChoices() { $setting = new Setting(); $choices = 'Some Choices'; $expected = $choices; $setting->setChoices($choices); $actual = $setting->getChoices(); $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); }