From 36ce8585e4accbddcc3fd9c5ff03dbeb793c6e28 Mon Sep 17 00:00:00 2001 From: Craig Paul Date: Wed, 19 Oct 2016 14:42:47 -0600 Subject: [PATCH] Adds processor test --- tests/ProcessorTest.php | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/ProcessorTest.php diff --git a/tests/ProcessorTest.php b/tests/ProcessorTest.php new file mode 100644 index 0000000..a19d074 --- /dev/null +++ b/tests/ProcessorTest.php @@ -0,0 +1,47 @@ +params = ['environment' => Moneris::ENV_TESTING]; + $this->gateway = Moneris::create($this->id, $this->token, $this->params)->connect(); + } + + /** @test */ + public function it_responds_to_an_invalid_transaction_with_the_proper_code_and_status() + { + $transaction = new Transaction($this->gateway); + + $response = Processor::process($transaction); + + $this->assertFalse($response->successful); + $this->assertEquals(Response::INVALID_TRANSACTION_DATA, $response->status); + } +} \ No newline at end of file