Example #1
0
 public function testName()
 {
     $setting = new Setting();
     $name = 'Some Name';
     $expected = $name;
     $setting->setName($name);
     $actual = $setting->getName();
     $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);
 }