|  | @@ -0,0 +1,38 @@
 | 
	
		
			
				|  |  | +<?php
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +use PHPUnit\Framework\TestCase;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +class TripalEntityCollectionTest extends TestCase {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  protected $collection = NULL;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  public function setUp() {
 | 
	
		
			
				|  |  | +    $details = ['uid' => 1, 'collection_name' => "test_collection_name"];
 | 
	
		
			
				|  |  | +    $collection = new TripalEntityCollection();
 | 
	
		
			
				|  |  | +    $collection->create($details);
 | 
	
		
			
				|  |  | +    $this->collection = $collection;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  public function testCreateCollectionAndBaseGetters() {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    $collection = $this->collection;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    $name = $collection->getName();
 | 
	
		
			
				|  |  | +    $collection_id = $collection->getCollectionID();
 | 
	
		
			
				|  |  | +    $this->assertEquals($name, "test_collection_name");
 | 
	
		
			
				|  |  | +    $this->assertNotNull($collection_id);
 | 
	
		
			
				|  |  | +    $this->assertInternalType("int", (int) $collection_id);
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  public function testAddBundle() {
 | 
	
		
			
				|  |  | +//create two entities, AND their fields.  annoying.
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    $details = ['bundle_name' => 'organism'];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  public function tearDown() {
 | 
	
		
			
				|  |  | +    $this->collection->delete();
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 |