Test_MI_License_Manager

The Google Analytics by MonsterInsights Test MI License Manager class.

Defined (1)

The class is defined in the following location(s).

/vendor/yoast/license-manager/tests/test-class-yoast-license-manager.php  
  1. class Test_MI_License_Manager extends Yst_License_Manager_UnitTestCase { 
  2.  
  3. private $class; 
  4.  
  5. public function setUp() { 
  6. $this->class = new MI_License_Manager_Double(); 
  7.  
  8. /** 
  9. * Make sure the API url is correct in the product 
  10. * @covers MI_License_Manager::get_api_url() 
  11. */ 
  12. public function test_get_api_url() { 
  13. $this->assertEquals( $this->class->product->get_api_url(), get_site_url() ); 
  14.  
  15. /** 
  16. * Make sure the API url is correct in the product 
  17. * @covers MI_License_Manager::get_curl_version() 
  18. */ 
  19. public function test_get_curl_version_WITH_curl_installed_on_test_server() { 
  20. $curl_result = $this->class->double_get_curl_version(); 
  21.  
  22. if( function_exists('curl_version') ) { 
  23. $curl_version = curl_version(); 
  24.  
  25. $this->assertEquals( $curl_result, $curl_version['version'] ); 
  26. else{ 
  27. $this->assertFalse( $curl_result ); 
  28.