示例#1
0
 public function testAdditionResult()
 {
     // Arrange
     $a = new Money();
     // Act
     $b = $a->addition(1, 1);
     // Assert
     $this->assertEquals(2, $b);
 }
示例#2
0
文件: index.php 项目: ds0201/devci
<?php

include "Money.php";
$a = new Money(1);
$b = 1;
$c = 2;
$r = $a->addition($b, $c);
$s = $a->substraction($c, $b);
echo "Le résultat de {$b} + {$c} est " . $r;
echo "<br/>Le résultat de {$c} - {$b} est " . $s;
echo "<br>Test";