First Local Commit - After Clean up.
Signed-off-by: Rick Hays <rhays@haysgang.com>
This commit is contained in:
17
tests/_support/View/MockTable.php
Normal file
17
tests/_support/View/MockTable.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace Tests\Support\View;
|
||||
|
||||
class MockTable extends \CodeIgniter\View\Table {
|
||||
|
||||
// Override inaccessible protected method
|
||||
public function __call($method, $params)
|
||||
{
|
||||
if (is_callable([$this, '_' . $method]))
|
||||
{
|
||||
return call_user_func_array([$this, '_' . $method], $params);
|
||||
}
|
||||
|
||||
throw new BadMethodCallException('Method ' . $method . ' was not found');
|
||||
}
|
||||
|
||||
}
|
||||
52
tests/_support/View/SampleClass.php
Normal file
52
tests/_support/View/SampleClass.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php namespace Tests\Support\View;
|
||||
|
||||
/**
|
||||
* Class SampleClass
|
||||
*
|
||||
* This class is only used to provide a reference point
|
||||
* during tests to make sure that things work as expected.
|
||||
*/
|
||||
|
||||
class SampleClass {
|
||||
|
||||
public function index()
|
||||
{
|
||||
return 'Hello World';
|
||||
}
|
||||
|
||||
public function hello()
|
||||
{
|
||||
return 'Hello';
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
public function echobox($params)
|
||||
{
|
||||
if (is_array($params))
|
||||
{
|
||||
$params = implode(',', $params);
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
public static function staticEcho($params)
|
||||
{
|
||||
if (is_array($params))
|
||||
{
|
||||
$params = implode(',', $params);
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
public function work($p1, $p2, $p4)
|
||||
{
|
||||
return 'Right on';
|
||||
}
|
||||
}
|
||||
1
tests/_support/View/Views/simple.php
Normal file
1
tests/_support/View/Views/simple.php
Normal file
@@ -0,0 +1 @@
|
||||
<h1><?= $testString ?></h1>
|
||||
1
tests/_support/View/Views/simpler.php
Normal file
1
tests/_support/View/Views/simpler.php
Normal file
@@ -0,0 +1 @@
|
||||
<h1>{testString}</h1>
|
||||
Reference in New Issue
Block a user