Skip to content

Commit

Permalink
Merge pull request humanmade#112 from humanmade/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
joehoyle committed May 31, 2014
2 parents be0d350 + 6b9c93b commit 7f96b3b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions tests/backgroundFillAutoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function testBackgroundFillOnWhiteImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 1000, 'Width is not expected' );
$this->assertEquals( $new_height, 1000, 'Height is not expcted' );
$this->assertEquals( $new_height, 1000, 'Height is not expected' );

$this->assertImageRGBAtPoint( $file, array( 0, 0 ), array( 255, 255, 255 ) );
}
Expand All @@ -32,7 +32,7 @@ function testBackgroundFillOnMixedColourImage() {

$path = dirname( __FILE__ ) . '/images/checked.png';

// How bacbkground fill the cropped imageg (which is mixed colours)
// How background fill the cropped imageg (which is mixed colours)

$image = new WP_Thumb( $path, "width=400&height=100&crop=1&cache=0&return=path&background_fill=auto" );

Expand All @@ -44,15 +44,15 @@ function testBackgroundFillOnMixedColourImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 10, 'Width is not expected' );
$this->assertEquals( $new_height, 10, 'Height is not expcted' );
$this->assertEquals( $new_height, 10, 'Height is not expected' );

}

function testBackgroundFillOnTransparentImage() {

$path = dirname( __FILE__ ) . '/images/transparent.png';

// check the iamge is transparent
// check the image is transparent
$this->assertImageAlphaAtPoint( $path, array( 0, 0 ), 127 );

$image = new WP_Thumb( $path, 'width=400&height=100&crop=1&background_fill=auto&cache=0&return=path' );
Expand Down
2 changes: 1 addition & 1 deletion tests/backgroundFillTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function testBackgroundFillOnWhiteImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 100, 'Width is not expected' );
$this->assertEquals( $new_height, 100, 'Height is not expcted' );
$this->assertEquals( $new_height, 100, 'Height is not expected' );

$this->assertImageRGBAtPoint( $file, array(1,1), array(255,255,255) );
}
Expand Down
6 changes: 3 additions & 3 deletions tests/cropResizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function testCropResizeStandard() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 80, 'Width is not expected' );
$this->assertEquals( $new_height, 80, 'Height is not expcted' );
$this->assertEquals( $new_height, 80, 'Height is not expected' );

}

Expand All @@ -45,7 +45,7 @@ function testCropLargerThanSourceImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, $width, 'Width is not expected' );
$this->assertEquals( $new_height, $height, 'Height is not expcted' );
$this->assertEquals( $new_height, $height, 'Height is not expected' );

}

Expand All @@ -67,7 +67,7 @@ function testCropLargerThanSingleDimention() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 200, 'Width is not expected' );
$this->assertEquals( $new_height, $height, 'Height is not expcted' );
$this->assertEquals( $new_height, $height, 'Height is not expected' );

}

Expand Down
2 changes: 1 addition & 1 deletion tests/fileNamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function testFileWithLocalURL() {
$image = new WP_Thumb;
$image->setFilePath( $url );

$this->assertFalse( $image->errored(), 'Image error occured' );
$this->assertFalse( $image->errored(), 'Image error occurred' );
$this->assertEquals( $path, $image->getFilePath() );

}
Expand Down
4 changes: 2 additions & 2 deletions tests/remoteImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function testFetchRemoteImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 275, 'Width is not expected' );
$this->assertEquals( $new_height, 95, 'Height is not expcted' );
$this->assertEquals( $new_height, 95, 'Height is not expected' );

}

Expand All @@ -36,7 +36,7 @@ function testResizeRemoteImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, 80, 'Width is not expected' );
$this->assertEquals( $new_height, 80, 'Height is not expcted' );
$this->assertEquals( $new_height, 80, 'Height is not expected' );

}

Expand Down
4 changes: 2 additions & 2 deletions tests/resizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function testResizeProportional() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, $width, 'Width is not expected' );
$this->assertEquals( $new_height, floor( $height / 2 ), 'Height is not expcted' );
$this->assertEquals( $new_height, floor( $height / 2 ), 'Height is not expected' );
}

function testResizeProportionalLargeThanSourceImage() {
Expand All @@ -45,7 +45,7 @@ function testResizeProportionalLargeThanSourceImage() {
list( $new_width, $new_height ) = getimagesize( $file );

$this->assertEquals( $new_width, $width / 2, 'Width is not expected' );
$this->assertEquals( $new_height, floor( $height ), 'Height is not expcted' );
$this->assertEquals( $new_height, floor( $height ), 'Height is not expected' );
}

}
Expand Down
4 changes: 2 additions & 2 deletions wpthumb.crop-from-position.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

/**
* Only add the watermkaring admin optins if the current theme suports it, as we don;t want to clutter
* for poeple who don't care
* Only add the watermarking admin options if the current theme supports it, as we don't want to clutter
* for people who don't care
*
*/
function wpthumb_add_crop_from_position_admin_hooks() {
Expand Down
6 changes: 3 additions & 3 deletions wpthumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public function generateCacheFile() {
$editor = wp_get_image_editor( $file_path, array( 'methods' => array( 'get_image' ) ) );

/**
* Workaround to preserve image blending when images are not specifically resized (smaller than dimentions for example)
* Workaround to preserve image blending when images are not specifically resized (smaller than dimensions for example)
*/
if ( is_a( $editor, 'WP_Thumb_Image_Editor_GD' ) ) {
imagealphablending( $editor->get_image(), false);
Expand Down Expand Up @@ -613,7 +613,7 @@ function wpthumb_post_image( $null, $id, $args ) {
// native looks like 'thumbnail'
if ( is_string( $args ) && ! strpos( (string) $args, '=' ) ) {

// if there are no "special" wpthumb args, then we shouldn' bother creating a WP Thumb, just use the WordPress one
// if there are no "special" wpthumb args, then we shouldn't bother creating a WP Thumb, just use the WordPress one
if ( $args === ( $args = apply_filters( 'wpthumb_create_args_from_size', $args ) ) )
return $null;
}
Expand Down Expand Up @@ -670,7 +670,7 @@ function wpthumb_post_image( $null, $id, $args ) {
add_filter( 'image_downsize', 'wpthumb_post_image', 99, 3 );

/**
* Hook into wp_delete_file and delete the assocated cache files
* Hook into wp_delete_file and delete the associated cache files
*
* @param string $file
* @return string
Expand Down
6 changes: 3 additions & 3 deletions wpthumb.watermark.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function wpthumb_wm_get_watermark_masks() {
}

/**
* Returns the watermaring image file for a given watermark name
* Returns the watermarking image file for a given watermark name
*
* @param string $mask
* @return string
Expand All @@ -367,9 +367,9 @@ function wpthumb_wm_get_watermark_mask_file( $mask ) {
}

/**
* Registers extr awatermark images for the suer to select in the admin
* Registers extra watermark images for the user to select in the admin
*
* @param string $name - sanetixed identifier
* @param string $name - sanitized identifier
* @param string $file - full path to the watermarking image
* @param string $label - test to be used for the watermarks name
*/
Expand Down

0 comments on commit 7f96b3b

Please sign in to comment.