mirror of
https://github.com/janunger/rheinwerk-video-training.git
synced 2024-11-22 23:23:42 +01:00
28 lines
587 B
PHP
28 lines
587 B
PHP
|
<?php
|
||
|
|
||
|
namespace MeineApp;
|
||
|
|
||
|
class TaschenrechnerTest extends \PHPUnit_Framework_TestCase
|
||
|
{
|
||
|
/**
|
||
|
* @var Taschenrechner
|
||
|
*/
|
||
|
private $taschenrechner;
|
||
|
|
||
|
protected function setUp()
|
||
|
{
|
||
|
$this->taschenrechner = new Taschenrechner();
|
||
|
}
|
||
|
|
||
|
public function testAddiertZweiZahlen()
|
||
|
{
|
||
|
$ergebnis = $this->taschenrechner->addiere(1, 2);
|
||
|
$this->assertEquals(3, $ergebnis);
|
||
|
}
|
||
|
|
||
|
public function testSubtrahiertZweiZahlen()
|
||
|
{
|
||
|
$ergebnis = $this->taschenrechner->subtrahiere(1, 2);
|
||
|
$this->assertEquals(-1, $ergebnis);
|
||
|
}
|
||
|
}
|