Skip to content

Commit

Permalink
Test rowClass
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Aug 5, 2011
1 parent 3952b61 commit bc56acf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/30-rowclass.phpt
@@ -0,0 +1,29 @@
--TEST--
Custom row class
--FILE--
<?php
include_once dirname(__FILE__) . "/connect.inc.php";

class TestRow extends NotORM_Row {

function offsetExists($key) {
return parent::offsetExists(preg_replace('~^test_~', '', $key));
}

function offsetGet($key) {
return parent::offsetGet(preg_replace('~^test_~', '', $key));
}

}

$software->rowClass = 'TestRow';

$application = $software->application[1];
echo "$application[test_title]\n";
echo $application->author["test_name"] . "\n";

$software->rowClass = 'NotORM_Row';
?>
--EXPECTF--
Adminer
Jakub Vrana

0 comments on commit bc56acf

Please sign in to comment.