diff --git a/calculator.php b/calculator.php index 1011055..6147ffd 100644 --- a/calculator.php +++ b/calculator.php @@ -9,6 +9,7 @@ public function add($numbers_to_add){ return $sum; } + public function subtract($x, $y){ return $x - $y; } diff --git a/shippable.yml b/shippable.yml index 8163678..cee1bc2 100644 --- a/shippable.yml +++ b/shippable.yml @@ -1,7 +1,7 @@ language: php php: - - 5.3 + #- 5.3 - 5.4 - 5.5 - 5.6 @@ -13,12 +13,26 @@ before_script: script: - phpunit --log-junit shippable/testresults/junit.xml --coverage-xml shippable/codecoverage tests/calculator_test.php -notifications: - email: false +archive: true +#build_image: shippable/minv2:beta + - after_script: - #php-mongo - - curl -XPOST https://apibeta.shippable.com/projects/53bf610155a71a2200f19124/build?token=$SHIPPABLE_API_TOKEN - #php-mysql - - curl -XPOST https://apibeta.shippable.com/projects/53bf610355a71a2200f19126/build?token=$SHIPPABLE_API_TOKEN + - echo "test" + +parallelized_test : true +#cache: true + +after_success: + - echo "Build ran successfully" + +after_failure: + - echo "Build failed" + +notifications: + email: + recipients: + - vidya@shippable.com + - buildsampletest@gmail.com + on_success: change + on_failure: always diff --git a/tests/calculator_test.php b/tests/calculator_test.php index fdcd534..45ead87 100644 --- a/tests/calculator_test.php +++ b/tests/calculator_test.php @@ -8,7 +8,7 @@ class CalculatorTest extends PHPUnit_Framework_TestCase{ public function testAdd(){ $calc = new Calculator(); $sum = $calc->add(array(2,3,4,5)); - $this->assertEquals(14, $sum); //check if 2+3+4+5 is equal to 14 + $this->assertEquals(114, $sum); //check if 2+3+4+5 is equal to 14 } //test if the subtract() method in our calculator class