public function testIfFalseCombination() { $this->showMapper->ifFalse(true); $this->showMapper->add('fooName'); $this->showMapper->ifEnd(); $this->showMapper->add('barName'); $this->assertFalse($this->showMapper->has('fooName')); $this->assertTrue($this->showMapper->has('barName')); $fieldDescription = $this->showMapper->get('barName'); $this->assertInstanceOf('Sonata\\AdminBundle\\Admin\\FieldDescriptionInterface', $fieldDescription); $this->assertSame('barName', $fieldDescription->getName()); $this->assertSame('barName', $fieldDescription->getOption('label')); }