Commit d08f4926 authored by meus's avatar meus

removing ending ?> and some tabs

parent eb92f6d2
......@@ -123,4 +123,3 @@ class Doctrine_Access_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($user->get('name'), 'Jack');
}
}
?>
......@@ -85,4 +85,3 @@ class Doctrine_BatchIterator_TestCase extends Doctrine_UnitTestCase {
}
}
?>
......@@ -57,4 +57,3 @@ class Doctrine_Cache_FileTestCase extends Doctrine_UnitTestCase {
}
}
?>
......@@ -37,4 +37,3 @@ class Doctrine_Cache_Query_SqliteTestCase extends Doctrine_UnitTestCase {
$this->assertEqual($this->cache->count(), 0);
}
}
?>
......@@ -107,4 +107,3 @@ class Doctrine_Cache_SqliteTestCase extends Doctrine_UnitTestCase {
}
}
?>
......@@ -74,4 +74,3 @@ class Doctrine_Collection_Offset_TestCase extends Doctrine_UnitTestCase {
$this->assertEqual($coll[6]->getState(), Doctrine_Record::STATE_CLEAN);
}
}
?>
......@@ -330,4 +330,3 @@ class Doctrine_Collection_TestCase extends Doctrine_UnitTestCase
}
}
?>
......@@ -11,4 +11,3 @@ class Doctrine_Composite_PrimaryKey_TestCase extends Doctrine_UnitTestCase {
parent::prepareTables();
}
}
?>
......@@ -215,4 +215,3 @@ class Doctrine_Configurable_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue(is_array($this->manager->getAttributes()));
}
}
?>
......@@ -181,4 +181,3 @@ class Doctrine_Connection_Profiler_TestCase extends Doctrine_UnitTestCase
$this->assertTrue(is_numeric($this->profiler->lastEvent()->getElapsedSecs()));
}
}
?>
......@@ -232,4 +232,3 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
}
}
?>
......@@ -180,4 +180,3 @@ class Doctrine_Connection_Transaction_TestCase extends Doctrine_UnitTestCase {
$this->assertEqual($listener->pop(), 'onPreTransactionCommit');
}
}
?>
......@@ -58,4 +58,3 @@ class Doctrine_CustomPrimaryKey_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($c->identifier(), array('uid' => 1));
}
}
?>
......@@ -177,4 +177,3 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase {
}
}
}
?>
......@@ -61,4 +61,3 @@ class Doctrine_DataDict_Sqlite_TestCase extends Doctrine_UnitTestCase {
}
}
*/
?>
......@@ -116,4 +116,3 @@ class Doctrine_DataType_Boolean_TestCase extends Doctrine_UnitTestCase {
}
}
?>
......@@ -200,4 +200,3 @@ class Doctrine_DataType_Enum_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), "SELECT e.id AS e__id, e.status AS e__status, e.text AS e__text, e2.text AS e2__text FROM enum_test e LEFT JOIN enum_test3 e2 ON e.text = e2.text WHERE e.status = 1");
}
}
?>
......@@ -174,4 +174,3 @@ class Doctrine_Connection_Profiler_TestCase extends Doctrine_UnitTestCase
$this->assertTrue(is_numeric($this->profiler->lastEvent()->getElapsedSecs()));
}
}
?>
......@@ -135,4 +135,3 @@ class Doctrine_Db_Profiler_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue(is_numeric($this->profiler->lastEvent()->getElapsedSecs()));
}
}
?>
......@@ -197,4 +197,3 @@ class Doctrine_Driver_UnitTestCase extends UnitTestCase {
}
}
}
?>
......@@ -90,4 +90,3 @@ class Doctrine_Export_Firebird_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($this->adapter->pop(), 'CREATE TABLE mytable (name CHAR(10), type INT, PRIMARY KEY(name, type))');
}
}
?>
......@@ -151,4 +151,3 @@ class Doctrine_Export_Oracle_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($sql[0], 'CREATE TABLE sometable (id INT UNIQUE, name VARCHAR2(4), PRIMARY KEY(id), INDEX myindex (id, name))');
}
}
?>
......@@ -96,4 +96,3 @@ class Doctrine_Export_Pgsql_TestCase extends Doctrine_UnitTestCase
));
}
}
?>
......@@ -152,4 +152,3 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase
}
*/
}
?>
......@@ -86,4 +86,3 @@ class Doctrine_Export_TestCase extends Doctrine_UnitTestCase
}
}
?>
......@@ -170,4 +170,3 @@ class Doctrine_Hook_TestCase extends Doctrine_UnitTestCase
}
}
?>
......@@ -59,4 +59,3 @@ class Doctrine_Manager_TestCase extends Doctrine_UnitTestCase {
public function prepareData() { }
public function prepareTables() { }
}
?>
......@@ -216,4 +216,3 @@ class Doctrine_Query_AggregateValue_TestCase extends Doctrine_UnitTestCase
}
?>
......@@ -121,4 +121,3 @@ class Doctrine_Query_ComponentAlias_TestCase extends Doctrine_UnitTestCase
}
}
?>
......@@ -118,4 +118,3 @@ class Doctrine_Query_Condition_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($query->getQuery(), $sql);
}
}
?>
......@@ -104,4 +104,3 @@ class Doctrine_Query_Delete_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), 'DELETE FROM entity LIMIT 10 OFFSET 20');
}
}
?>
......@@ -117,4 +117,3 @@ class Doctrine_Query_From_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), "SELECT e.id AS e__id, e.name AS e__name, p.id AS p__id, p.phonenumber AS p__phonenumber FROM entity e INNER JOIN groupuser g ON e.id = g.user_id INNER JOIN entity e2 ON e2.id = g.group_id LEFT JOIN phonenumber p ON e2.id = p.entity_id WHERE (e.type = 0 AND (e2.type = 1 OR e2.type IS NULL))");
}
}
?>
......@@ -302,4 +302,3 @@ class Doctrine_Query_Limit_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getSql(), "SELECT p.id AS p__id, p.name AS p__name, t.id AS t__id, t.tag AS t__tag FROM photo p LEFT JOIN phototag p2 ON p.id = p2.photo_id LEFT JOIN tag t ON t.id = p2.tag_id WHERE p.id IN (SELECT DISTINCT p3.id FROM photo p3 LEFT JOIN phototag p4 ON p3.id = p4.photo_id LEFT JOIN tag t2 ON t2.id = p4.tag_id ORDER BY t2.id DESC LIMIT 10) ORDER BY t.id DESC");
}
}
?>
......@@ -200,4 +200,3 @@ class Doctrine_Query_ReferenceModel_TestCase extends Doctrine_UnitTestCase {
}
*/
}
?>
......@@ -231,4 +231,3 @@ class Doctrine_Query_Select_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($users[4]->Phonenumber[0]->max, '444 555');
}
}
?>
......@@ -109,23 +109,22 @@ class Doctrine_Query_Subquery_TestCase extends Doctrine_UnitTestCase
}
public function testAggregateFunctionsInOrderByAndHavingWithCount()
{
$q = new Doctrine_Query();
$q->select('u.*, COUNT(a.id) num_albums')
->from('User u')
->leftJoin('u.Album a')
->orderby('num_albums desc')
->groupby('u.id')
->having('num_albums > 0')
->limit(5);
try {
$q->count();
$this->pass();
} catch (Doctrine_Exception $e) {
$this->fail();
}
}
{
$q = new Doctrine_Query();
$q->select('u.*, COUNT(a.id) num_albums')
->from('User u')
->leftJoin('u.Album a')
->orderby('num_albums desc')
->groupby('u.id')
->having('num_albums > 0')
->limit(5);
try {
$q->count();
$this->pass();
} catch (Doctrine_Exception $e) {
$this->fail();
}
}
}
?>
......@@ -81,4 +81,3 @@ class Doctrine_Query_Update_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), "UPDATE entity SET id = id + 1 WHERE (type = 0)");
}
}
?>
......@@ -249,4 +249,3 @@ class Doctrine_RawSql_TestCase extends Doctrine_UnitTestCase
$this->assertEqual(count($coll), 3);
}
}
?>
......@@ -43,4 +43,3 @@ class Doctrine_Record_Filter_TestCase extends Doctrine_UnitTestCase {
}
}
?>
......@@ -47,7 +47,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
{
$user = new User();
$user->name = "Richard Linklater";
$rel = $user->getTable()->getRelation('Account');
$this->assertTrue($rel instanceof Doctrine_Relation_ForeignKey);
......@@ -148,7 +148,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->connection->clear();
$gzip = $gzip->getTable()->find($gzip->id);
$this->assertEqual($gzip->gzip, "compressed");
$gzip->gzip = "compressed 2";
$this->assertEqual($gzip->gzip, "compressed 2");
......@@ -162,7 +162,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
{
$test = new FieldNameTest;
$this->assertEqual($test->someColumn, 'some string');
$this->assertEqual($test->someEnum, 'php');
$this->assertEqual($test->someArray, array());
......@@ -174,12 +174,12 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
public function testToArray()
{
$user = new User();
$a = $user->toArray();
$this->assertTrue(is_array($a));
$this->assertTrue(array_key_exists('name', $a));
$this->assertEqual($a['name'], null);
$this->assertTrue(array_key_exists('id', $a));
......@@ -196,7 +196,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($a['name'], 'Someone');
$this->assertTrue(array_key_exists('id', $a));
$this->assertTrue(is_numeric($a['id']));
$user->refresh();
$a = $user->toArray();
......@@ -290,7 +290,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($record->entity1, 3);
$this->assertEqual($record->identifier(), array("entity1" => 3, "entity2" => 4));
$record->entity2 = 5;
$record->entity1 = 2;
$this->assertEqual($record->state(), Doctrine_Record::STATE_DIRTY);
......@@ -309,7 +309,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($record->entity2, 5);
$this->assertEqual($record->entity1, 2);
$this->assertEqual($record->identifier(), array("entity1" => 2, "entity2" => 5));
$record->refresh();
$this->assertEqual($record->state(), Doctrine_Record::STATE_CLEAN);
$this->assertEqual($record->entity2, 5);
......@@ -320,7 +320,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$record->entity2 = 6;
$record->entity1 = 2;
$record->save();
$coll = $this->connection->query("FROM EntityReference");
$this->assertTrue($coll[0] instanceof EntityReference);
$this->assertEqual($coll[0]->state(), Doctrine_Record::STATE_CLEAN);
......@@ -417,7 +417,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($fk->getType(), Doctrine_Relation::MANY_AGGREGATE);
$this->assertEqual($fk->getForeign(), "parent_id");
$this->assertEqual($fk->getLocal(), "id");
$e->name = "parent";
......@@ -480,7 +480,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($e2->code,2);
$this->assertEqual($e2->file_md5, md5(1));
$this->assertEqual($e2->message, 'user error2');
$fk = $e->getTable()->getRelation('Description');
$this->assertTrue($fk instanceof Doctrine_Relation_ForeignKey);
......@@ -501,7 +501,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($e2->Description[1]->file_md5, $e2->file_md5);
$e->save();
$coll = $this->connection->query('FROM Error');
$e = $coll[0];
......@@ -518,7 +518,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($e->Description[1]->description, 'This is the 2nd description');
// UPDATING
$e->code = 2;
$e->message = 'changed message';
$e->Description[0]->description = '1st changed description';
......@@ -542,9 +542,9 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$user = new User();
$user->name = "John Locke";
$user->save();
$this->assertTrue(is_numeric($user->id) && $user->id > 0);
$this->assertTrue($user->getModified() == array());
$this->assertTrue($user->state() == Doctrine_Record::STATE_CLEAN);
......@@ -720,7 +720,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$user = $this->objTable->find(5);
$this->assertTrue($user->Email instanceof Email);
$this->assertEqual($user->Email->address, "absolutist@nottodrink.com");
$emails = $this->connection->query("FROM Email WHERE Email.id = $id");
//$this->assertEqual(count($emails),0);
......@@ -822,7 +822,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($user->Group->count(), 0);
$user = $this->objTable->find(5);
$this->assertEqual($user->Group->count(), 0);
// ACCESSING ASSOCIATION OBJECT PROPERTIES
......@@ -831,7 +831,7 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$this->assertTrue($user->Groupuser instanceof Doctrine_Collection);
$this->assertTrue($user->Groupuser[0] instanceof Groupuser);
$user->name = "Jack Daniels";
$user->Group[0]->name = "Group #1";
$user->Group[1]->name = "Group #2";
......@@ -839,10 +839,10 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$t2 = time();
$user->Groupuser[0]->added = $t1;
$user->Groupuser[1]->added = $t2;
$this->assertEqual($user->Groupuser[0]->added, $t1);
$this->assertEqual($user->Groupuser[1]->added, $t2);
$user->save();
$user->refresh();
......@@ -874,21 +874,20 @@ class Doctrine_Record_TestCase extends Doctrine_UnitTestCase
$user = $this->connection->getTable("User")->find(4);
$this->assertTrue($user->getIterator() instanceof ArrayIterator);
}
public function testRefreshRelated()
{
$user = $this->connection->getTable("User")->find(4);
$user->Address[0]->address = "Address #1";
$user->Address[1]->address = "Address #2";
$user->save();
$this->assertEqual(count($user->Address), 2);
Doctrine_Query::create()->delete()->from('EntityAddress')->where('user_id = ? AND address_id = ?', array($user->id, $user->Address[1]->id))->execute();
$user->refreshRelated('Address');
$this->assertEqual(count($user->Address), 1);
Doctrine_Query::create()->delete()->from('EntityAddress')->where('user_id = ? AND address_id = ?', array($user->id, $user->Address[0]->id))->execute();
$user->refreshRelated();
$this->assertEqual(count($user->Address), 0);
$user = $this->connection->getTable("User")->find(4);
$user->Address[0]->address = "Address #1";
$user->Address[1]->address = "Address #2";
$user->save();
$this->assertEqual(count($user->Address), 2);
Doctrine_Query::create()->delete()->from('EntityAddress')->where('user_id = ? AND address_id = ?', array($user->id, $user->Address[1]->id))->execute();
$user->refreshRelated('Address');
$this->assertEqual(count($user->Address), 1);
Doctrine_Query::create()->delete()->from('EntityAddress')->where('user_id = ? AND address_id = ?', array($user->id, $user->Address[0]->id))->execute();
$user->refreshRelated();
$this->assertEqual(count($user->Address), 0);
}
}
?>
This diff is collapsed.
......@@ -204,4 +204,3 @@ class Doctrine_Relation_ManyToMany_TestCase extends Doctrine_UnitTestCase {
$this->assertEqual($component->name, 'changed name');
}
}
?>
<?php
class Doctrine_RepositoryTestCase extends Doctrine_UnitTestCase {
public function testAdd() {
}
}
?>
......@@ -237,4 +237,3 @@ class Doctrine_Table_TestCase extends Doctrine_UnitTestCase
}
}
?>
......@@ -84,4 +84,3 @@ class Doctrine_Ticket_Njero_TestCase extends Doctrine_UnitTestCase
#echo "Values " . serialize(array($c, $c2, $c3));
}
}?>
......@@ -294,4 +294,3 @@ class Doctrine_UnitTestCase extends UnitTestCase
$this->init = true;
}
}
?>
......@@ -411,4 +411,3 @@ class Doctrine_Validator_TestCase extends Doctrine_UnitTestCase
$this->manager->setAttribute(Doctrine::ATTR_VLD, false);
}
}
?>
......@@ -58,4 +58,3 @@ class Doctrine_ValueHolder_TestCase extends Doctrine_UnitTestCase {
$this->assertTrue($f);
}
}
?>
......@@ -74,7 +74,5 @@ class Doctrine_View_TestCase extends Doctrine_UnitTestCase
public function testConstructor()
{
}
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment