public function testAdd()
 {
     $this->showMapper->add('fooName');
     $this->assertTrue($this->showMapper->has('fooName'));
     $fieldDescription = $this->showMapper->get('fooName');
     $this->assertInstanceOf('Sonata\\AdminBundle\\Admin\\FieldDescriptionInterface', $fieldDescription);
     $this->assertEquals('fooName', $fieldDescription->getName());
     $this->assertEquals('fooName', $fieldDescription->getOption('label'));
 }
 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'));
 }