Skip to content

Commit

Permalink
#538 - Update Classifai\Tests\Providers\Azure\ComputerVisionTest::tes…
Browse files Browse the repository at this point in the history
…t_no_computer_vision_option_set test.
  • Loading branch information
joshuaabenazer committed Jul 25, 2023
1 parent 1d2cf79 commit 8a457ba
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/Classifai/Providers/Azure/ComputerVisionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,30 @@ public function test_smart_crop_image() {


/**
* Ensure that settings returns empty array of the `classifai_computer_vision` is not set.
* Ensure that settings returns default settings array if the `classifai_computer_vision` is not set.
*/
public function test_no_computer_vision_option_set() {
delete_option( 'classifai_computer_vision' );

$settings = $this->get_computer_vision()->get_settings();

$this->assertSame( $settings, array() );
$this->assertSame( $settings, [
'valid' => false,
'url' => '',
'api_key' => '',
'enable_image_captions' => array(
'alt' => 0,
'caption' => 0,
'description' => 0,
),
'enable_image_tagging' => true,
'enable_smart_cropping' => false,
'enable_ocr' => false,
'enable_read_pdf' => false,
'caption_threshold' => 75,
'tag_threshold' => 70,
'image_tag_taxonomy' => 'classifai-image-tags',
] );
}

/**
Expand Down

0 comments on commit 8a457ba

Please sign in to comment.