Exemple #1
0
    public function testCowTraits()
    {
        $message = 'I output a single line';
        $expected = '  ----------------------
< I output a single line >
  ----------------------
          \\   ^__^
           \\  (ee)\\_______
              (__)\\       )\\/\\
               k  ||----Z |
                  ||     || uu';
        $c = new Cow($message);
        $c->setEyes('e');
        $c->setTongue('k');
        $c->setUdder('Z');
        $c->setPoop('uu');
        $this->assertSame($expected, $c->say());
    }
Exemple #2
0
 public function testCowSupportedTraits()
 {
     $c = new Cow();
     $this->assertSame(['CowSay\\Traits\\Eyes' => 'Eyes', 'CowSay\\Traits\\Tongue' => 'Tongue', 'CowSay\\Traits\\Udder' => 'Udder', 'CowSay\\Traits\\Poop' => 'Poop'], $c->getSupportedTraits());
 }