PHP code example of wsteel / tp60unit
1. Go to this page and download the library: Download wsteel/tp60unit library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wsteel / tp60unit example snippets
namespace tests\demo;
use wsteel\tp60unit\TestCase;
class demoTest extends TestCase
{
public function testTrue()
{
$this->assertTrue(true);
}
public function testFalse()
{
$this->assertFalse(false, 'false');
}
public function testModel()
{
$e = \app\model\User::find(1);
dump($e);
$this->assertNotEmpty($e);
}
public function testDB()
{
$user = Db::name('user');
$e = $user->where('id', '=' ,1)->select();
dump($e);
$this->assertNotEmpty($e);
}
public function testConfig()
{
$config = config('database');
dump($config);
$this->assertNotEmpty($config);
}
}