class GroupsTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/serializer/Tests/Annotation/GroupsTest.php \Symfony\Component\Serializer\Tests\Annotation\GroupsTest
@author Kévin Dunglas <dunglas@gmail.com>
Hierarchy
- class \Symfony\Component\Serializer\Tests\Annotation\GroupsTest extends \Symfony\Component\Serializer\Tests\Annotation\PHPUnit_Framework_TestCase
Expanded class hierarchy of GroupsTest
File
- vendor/symfony/ serializer/ Tests/ Annotation/ GroupsTest.php, line 19 
Namespace
Symfony\Component\Serializer\Tests\AnnotationView source
class GroupsTest extends \PHPUnit_Framework_TestCase {
  /**
   * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
   */
  public function testEmptyGroupsParameter() {
    new Groups(array(
      'value' => array(),
    ));
  }
  /**
   * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
   */
  public function testNotAnArrayGroupsParameter() {
    new Groups(array(
      'value' => 'coopTilleuls',
    ));
  }
  /**
   * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
   */
  public function testInvalidGroupsParameter() {
    new Groups(array(
      'value' => array(
        'a',
        1,
        new \stdClass(),
      ),
    ));
  }
  public function testGroupsParameters() {
    $validData = array(
      'a',
      'b',
    );
    $groups = new Groups(array(
      'value' => $validData,
    ));
    $this
      ->assertEquals($validData, $groups
      ->getGroups());
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| GroupsTest:: | public | function | @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException | |
| GroupsTest:: | public | function | ||
| GroupsTest:: | public | function | @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException | |
| GroupsTest:: | public | function | @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException | 
