public function testBuildExceptions() { $project = new Xinc_Project(); $project->setName('test'); $build = new Xinc_Build(new Xinc_Engine_Sunrise(), $project); $buildTimestamp = time() + 1; $build->setBuildTime($buildTimestamp); $build->setStatus(Xinc_Build_Interface::INITIALIZED); $build->getProperties()->set('test', 1); //$workingDir = getcwd(); //Xinc::getInstance()->setStatusDir($workingDir); try { $result = $build->serialize(); $this->assertTrue(false, 'Should not serialize successfull'); } catch (Xinc_Build_Exception_NotRun $e) { $this->assertTrue(true, 'Serialization should throw an execption'); } catch (Exception $e) { $this->assertTrue(false, 'Should not throw this exception'); } try { $object = Xinc_Build::unserialize($project, $buildTimestamp); } catch (Xinc_Build_Exception_NotFound $pe) { $this->assertTrue(true, 'Serialization should throw an execption'); } catch (Exception $e) { $this->assertTrue(false, 'Unserialization should not throw an execption'); } }