Skip to content

Commit 8de543a

Browse files
committed
Add unit test bootstrap skeleton
1 parent 34407a8 commit 8de543a

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit colors="true">
3+
<phpunit colors="true" bootstrap="./tests/bootstrap.php">
44
<testsuites>
55
<testsuite name="Socks Test Suite">
66
<directory>./tests/</directory>

tests/ClientApiTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
22

3-
(include_once __DIR__.'/../vendor/autoload.php') OR die(PHP_EOL.'ERROR: composer autoloader not found, run "composer install" or see README for instructions'.PHP_EOL);
4-
5-
class ClientApiTest extends PHPUnit_Framework_TestCase{
3+
class ClientApiTest extends TestCase
4+
{
65
public function setUp(){
76
$loop = React\EventLoop\Factory::create();
87

tests/bootstrap.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
(include_once __DIR__.'/../vendor/autoload.php') OR die(PHP_EOL.'ERROR: composer autoloader not found, run "composer install" or see README for instructions'.PHP_EOL);
4+
5+
abstract class TestCase extends PHPUnit_Framework_TestCase
6+
{
7+
8+
}

0 commit comments

Comments
 (0)