예제 #1
0
 public function testSubtractException()
 {
     $m1 = new Matrix([[1, 2, 3], [4, 5, 6]]);
     $m2 = new Matrix([[7, 8], [9, 10], [11, 12]]);
     try {
         $m1->subtract($m2);
     } catch (MatrixException $exception) {
         return;
     }
     $this->fail('MatrixException not raised.');
 }
예제 #2
0
 /**
  * @expectedException \DomainException
  */
 public function testSubtractException()
 {
     $arr1 = [[1, 2, 3, 4], [4, 5, 6, 7]];
     $arr2 = [[1, 2, 3]];
     $mat1 = new Matrix($arr1);
     $mat2 = new Matrix($arr2);
     $mat1->subtract($mat2);
 }