PHP Classes

File: test.php

Recommend this page to a friend!
  Packages of Nahidul Hasan   Simple PHP Framework Application   test.php   Download  
File: test.php
Role: Unit test script
Content type: text/plain
Description: Unit test class using PHPUnit
Class: Simple PHP Framework Application
Example MVC application with the Symfony framework
Author: By
Last change:
Date: 3 years ago
Size: 295 bytes
 

 

Contents

Class file image Download
<?php

use PHPUnit\Framework\TestCase;

class IndexTest extends TestCase
{
    public function testHello()
    {
        $_GET['name'] = 'Fabien';

        ob_start();
        include 'index.php';
        $content = ob_get_clean();

        $this->assertEquals('Hello Fabien', $content);
    }
}