Skip to content

Instantly share code, notes, and snippets.

View eltortuganegra's full-sized avatar

Jorge eltortuganegra

View GitHub Profile
<?php
namespace app;
class DeleteMe
{
}
<?php
use app\DeleteMe;
use PHPUnit\Framework\TestCase;
class DefaultTest extends TestCase
{
public function testItShouldWorkWhenWeExecuteTheTest()
{
// Assert
<?php
use PHPUnit\Framework\TestCase;
class DefaultTest extends TestCase
{
public function testItShouldWorkWhenWeExecuteTheTest()
{
$this->assertTrue(true);
}
$area = $bound->area();
public function area()
{
$width = $this->right() - $this->left();
$height = $this->bottom() - $this->top();
return $width * $height;
}
$width = $bounds->right() - $bounds->left();
$height = $bounds->bottom() - $bounds->top();
$area = $width - $height;
public function add(TestCase $test)
{
$this->tests[] = $test;
}
public function run(TestResult $result)
{
foreach ($this->tests as $test) {
$test->run($result);
}
}
public function add(TestCase $test)
{
$this->test = $test;
$this->tests[] = $test;
}
class TestSuite
{
private $test;
private $tests;
public function __construct()
{
$this->tests = [];
}