MathTest.php 512 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. use Math\CalcHelper as Calc;
  3. class MathTest extends \Codeception\Test\Unit
  4. {
  5. /**
  6. * @var \MathTester
  7. */
  8. protected $tester;
  9. /**
  10. * @var Calc
  11. */
  12. protected $calc;
  13. protected function _inject(Calc $calc)
  14. {
  15. $this->calc = $calc;
  16. }
  17. public function testAll()
  18. {
  19. $this->assertEquals(3, $this->calc->add(1, 2));
  20. $this->assertEquals(1, $this->calc->subtract(3, 2));
  21. $this->assertEquals(75, $this->calc->squareOfCircle(5));
  22. }
  23. }