Skip to content

Instantly share code, notes, and snippets.

View bobmagicii's full-sized avatar
🤌

Bob Magic II bobmagicii

🤌
View GitHub Profile
function Whatever() {
return <<< EOF
<div class="All">
<div class="OfThe">
HTML
</div>
</div>
EOF;
<?php
public function
Render() {
if(is_array($this->Value))
foreach($this->Value as &$Value)
$Value = $this->Database->Escape($Value);
// ...
Scriptname Math Hidden
; Calculates the absolute value of the passed in value - N for N, and N for (-N)
float Function abs(float afValue) global native
; Calculates the arccosine of the passed in value, returning degrees
float Function acos(float afValue) global native
; Calculates the arcsine of the passed in value, returning degrees
float Function asin(float afValue) global native
<?php
$router = (new Nether\Router)
->AddRoute('{@}//post/(#)','Routes\Post::ViewByID')
->AddRoute('{@}//admin/post(#)','Routes\Admin\Post::ViewByID');
try { $router->Run(); }
catch(...) { }
catch(...) { }
catch(...) { }
<?php
namespace Nether\Surface\Test;
use \Nether;
use \PHPUnit_Framework_TestCase;
////////
////////
class SurfaceGeneral
<?
$filter->DateStart(function($t){
if(!preg_match('/^\d{4}-\d{1,2}-\d{1,2}$/',$t))
$t = date('Y-m-d');
return $t;
});
$filter->DateEnd($filter('DateStart'));
<?php
namespace Packages;
trait ItemListProperty remix("ItemList") {
protected $ItemList = [];
public function
ItemListAdd($item) {
bob@devweb1 dmanetwork (master) $ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: codeception/codeception.yml
# new file: codeception/tests/MyTest_Test.php
# new file: codeception/tests/_bootstrap.php
i want to commit nothing more than to my vcs:
/codeception.yml
/tests/_bootstrap.php
/tests/unit.suite.yml
/tests/unit/Whatever_Test.php
no _support. none of that stuff. the files listed above are the minimum
viable data i should need to commit to make the tests work. configurations.
bob@devweb1 console (master) $ vendor/bin/codecept run unit
Codeception PHP Testing Framework v2.0.16
Powered by PHPUnit 4.7.7 by Sebastian Bergmann and contributors.
Unit Tests (6) -----------------------------------------------------------------
Test get method fr (Nether\Avenue\Console_Test::testGetMethodFromCommand) Ok..
Test parse command o (Nether\Avenue\Console_Test::testParseCommandOption) Ok..
Test parse command arg (Nether\Avenue\Console_Test::testParseCommandArgs) Ok..
Test general use (Nether\Avenue\Console_Test::testGeneralUse) Ok
Test inline handler us (Nether\Avenue\Console_Test::testInlineHandlerUse) Ok..