1
0
mirror of synced 2025-01-20 23:41:39 +03:00
doctrine2/tests/ExportReporterTestCase.php

27 lines
923 B
PHP
Raw Normal View History

2006-12-23 22:45:36 +00:00
<?php
class BadLyNamed__Class extends Doctrine_Record {
public function setTableDefinition() {
}
public function setUp() { }
}
class Doctrine_Export_Reporter_TestCase extends Doctrine_Driver_UnitTestCase {
public function __construct() {
parent::__construct('sqlite');
}
public function testExportChecksClassNaming() {
$reporter = $this->export->export('BadLyNamed__Class');
2006-12-27 21:20:26 +00:00
// Class name is not valid. Double underscores are not allowed
$this->assertEqual($reporter->pop(), array(E_WARNING, 'Badly named class.'));
}
public function testExportReportsExceptions() {
$reporter = $this->export->export('User');
2006-12-23 22:45:36 +00:00
// Class name is not valid. Double underscores are not allowed
$this->assertEqual($reporter->pop(), array(E_WARNING, Doctrine::ERR_CLASS_NAME));
2006-12-27 21:20:26 +00:00
}
2006-12-23 22:45:36 +00:00
}