Skip to content
Permalink
Browse files

PHP: Unit tests: init

  • Loading branch information
kornrunner committed Mar 7, 2018
1 parent 274f92c commit c751da46204f25402b8455b6687c2b9cc14ea5c4
Showing with 46 additions and 0 deletions.
  1. +14 −0 php/test/ExchangeTest.php
  2. +3 −0 php/test/bootstrap.php
  3. +29 −0 phpunit.xml.dist
@@ -0,0 +1,14 @@
<?php

use ccxt\Exchange;
use PHPUnit\Framework\TestCase;

class ExchangeTest extends TestCase {

public function testSum () {
$this->assertSame (0, Exchange::sum ());
$this->assertSame (2, Exchange::sum (2));
$this->assertSame (432, Exchange::sum (2, 30, 400));
$this->assertSame (439, Exchange::sum (2, null, [88], 30, '7', 400, null));
}
}
@@ -0,0 +1,3 @@
<?php

require_once __DIR__ . '/../../vendor/autoload.php';
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="php/test/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="true"
stopOnFailure="false">

<testsuites>
<testsuite name="ccxt Test Suite">
<directory>php/test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">php</directory>
</whitelist>
</filter>

<php>
<ini name="memory_limit" value="-1" />
</php>
</phpunit>

0 comments on commit c751da4

Please sign in to comment.
You can’t perform that action at this time.