tainacan/tests/test-importer.php

34 lines
800 B
PHP
Raw Normal View History

2018-02-20 13:35:43 +00:00
<?php
namespace Tainacan\Tests;
use Tainacan\Importer;
/**
* Class Importer
*
* @package Test_Tainacan
*/
class ImporterTests extends TAINACAN_UnitTestCase {
/**
* @group importer
*/
public function test_instance () {
$collection = $this->tainacan_entity_factory->create_entity(
'collection',
array(
'name' => 'Other',
'description' => 'adasdasdsa',
'default_order' => 'DESC',
'status' => 'publish'
),
true
);
$csv_importer = new Importer\CSV();
$csv_importer->set_collection( $collection );
// here the session is init already
$this->assertEquals( $_SESSION['tainacan_importer'], $csv_importer );
}
}