tainacan/tests/test-logs.php

36 lines
782 B
PHP
Raw Normal View History

<?php
/**
* Class TestCollections
*
* @package Test_Tainacan
*/
/**
* Sample test case.
*/
class Test_Logs extends WP_UnitTestCase {
/**
* Teste da insercao de um log simples apenas se criar o dado bruto
*/
function test_add() {
global $Tainacan_Logs;
$log = new Tainacan_Log();
//setando os valores na classe do tainacan
$log->set_title('blame someone');
$log->set_description('someone did that');
//inserindo
$log = $Tainacan_Logs->insert($log);
//retorna a taxonomia
$test = $Tainacan_Logs->get_log_by_id($log->get_id());
$this->assertEquals( 'blame someone', $test->get_title() );
$this->assertEquals( 'someone did that', $test->get_description() );
}
}