VersionControl_Git
[ class tree: VersionControl_Git ] [ index: VersionControl_Git ] [ all elements ]

Source for file VersionControl_Git_ObjectTest.php

Documentation is available at VersionControl_Git_ObjectTest.php

  1. <?php
  2.  
  3. chdir(dirname(__FILE__));
  4. set_include_path(get_include_path().PATH_SEPARATOR.realpath('../'));
  5.  
  6. require_once 'PHPUnit/Autoload.php';
  7. require_once 'VersionControl/Git.php';
  8.  
  9. require_once './checkFixtures.php';
  10.  
  11. {
  12.   public function fetch()
  13.   {
  14.     return $this;
  15.   }
  16. }
  17.  
  18. class VersionControl_Git_ObjectTest extends PHPUnit_Framework_TestCase
  19. {
  20.   public function testConstruct()
  21.   {
  22.     $git = new VersionControl_Git('./fixtures/001_VersionControl_Git');
  23.     $obj = new DummyGitObject($git'a45bb4512098e311e1e668bc73768cfaa75f9681');
  24.  
  25.     $this->assertTrue($obj instanceof VersionControl_Git_Object);
  26.     $this->assertEquals($obj->id'a45bb4512098e311e1e668bc73768cfaa75f9681');
  27.   }
  28.  
  29.   public function testToString()
  30.   {
  31.     $git = new VersionControl_Git('./fixtures/001_VersionControl_Git');
  32.     $obj = new DummyGitObject($git'a45bb4512098e311e1e668bc73768cfaa75f9681');
  33.  
  34.     $this->assertEquals((string)$obj'a45bb4512098e311e1e668bc73768cfaa75f9681');
  35.   }
  36. }

Documentation generated on Mon, 11 Mar 2019 15:43:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.