2017-12-03 20:33:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tainacan\Tests;
|
|
|
|
|
|
|
|
use Tainacan\Tests\Factories;
|
|
|
|
|
|
|
|
class TAINACAN_UnitTestCase extends \WP_UnitTestCase {
|
|
|
|
protected $tainacan_entity_factory;
|
2017-12-04 14:58:19 +00:00
|
|
|
protected $tainacan_field_factory;
|
|
|
|
protected $tainacan_filter_factory;
|
2018-01-08 21:30:26 +00:00
|
|
|
protected $user_id;
|
2017-12-03 20:33:16 +00:00
|
|
|
|
|
|
|
public function setUp(){
|
2017-12-04 18:44:48 +00:00
|
|
|
parent::setUp();
|
2017-12-03 20:33:16 +00:00
|
|
|
$this->tainacan_entity_factory = new Factories\Entity_Factory();
|
2017-12-12 11:59:50 +00:00
|
|
|
$this->tainacan_field_factory = new Factories\Field_Factory();
|
2017-12-04 14:58:19 +00:00
|
|
|
$this->tainacan_filter_factory = new Factories\Filter_Factory();
|
2018-01-03 19:38:00 +00:00
|
|
|
|
|
|
|
$new_admin_user = $this->factory()->user->create(array( 'role' => 'administrator' ));
|
|
|
|
wp_set_current_user($new_admin_user);
|
2018-01-08 21:30:26 +00:00
|
|
|
$this->user_id = $new_admin_user;
|
2017-12-03 20:33:16 +00:00
|
|
|
}
|
|
|
|
}
|