Created
March 18, 2012 06:10
-
-
Save jeremykendall/2069295 to your computer and use it in GitHub Desktop.
Tests the major plot point of Mercyful Fate's tune Melissa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MercyfulFate; | |
use MercyfulFate\KingDiamond; | |
class KingDiamondTest extends \PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @var MercyfulFate\Priest | |
*/ | |
private $_priest; | |
/** | |
* @var MercyfulFate\Witch\Melissa | |
*/ | |
private $_witch; | |
/** | |
* @var MercyfulFate\KingDiamond | |
*/ | |
private $_king; | |
public function setUp() | |
{ | |
$this->_priest = $this->getMock('MercyfulFate\Priest'); | |
$this->_witch = $this->getMock('MercyfulFate\Witch\Melissa'); | |
$this->_king = new KingDiamond(); | |
} | |
public function testKingSwearsRevengeOnPriest() | |
{ | |
$this->assertFalse($this->_king->swearsRevenge($this->_priest)); | |
$this->_priest->expects($this->once()) | |
->method('burnAtStake') | |
->with($this->_witch); | |
$this->_priest->burnAtStake($this->_witch); | |
$this->assertTrue($this->_king->swearsRevenge($this->_priest)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment