Skip to content

Commit

Permalink
Small improvements of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Olicek committed Jan 15, 2016
1 parent 8fe959b commit 875358f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0

matrix:
allow_failures:
- php: 5.4
- php: 7.0

before_install:
- if [ $TRAVIS_PHP_VERSION = '5.6' ]; then COVERAGE="-c `php -i | grep 'xdebug.ini'` --coverage coverage.xml --coverage-src src/"; else COVERAGE="" && if [ $TRAVIS_PHP_VERSION = '5.6' ]; then phpenv config-rm xdebug.ini; fi; fi
Expand All @@ -16,4 +16,4 @@ install:

script:
- vendor/bin/phpcs --standard=standards.xml --extensions=php --encoding=utf-8 -sp src/
- vendor/bin/tester -p php $COVERAGE tests/
- vendor/bin/tester -p php $COVERAGE tests/
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Google Map API [![Latest Version on Packagist][ico-version]][link-packagist] [![Packagist](https://img.shields.io/packagist/dt/olicek/google-map-api.svg)](https://packagist.org/packages/olicek/google-map-api/stats) [![Build Status](https://travis-ci.org/Olicek/GoogleMapAPI.svg?branch=master)](https://travis-ci.org/Olicek/GoogleMapAPI) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Olicek/GoogleMapAPI/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Olicek/GoogleMapAPI/?branch=master)
=========
# Google Map API

[![Latest stable](https://img.shields.io/packagist/v/olicek/google-map-api.svg)](https://packagist.org/packages/olicek/google-map-api) [![Packagist](https://img.shields.io/packagist/dt/olicek/google-map-api.svg)](https://packagist.org/packages/olicek/google-map-api/stats) [![Build Status](https://travis-ci.org/Olicek/GoogleMapAPI.svg?branch=master)](https://travis-ci.org/Olicek/GoogleMapAPI) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Olicek/GoogleMapAPI/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Olicek/GoogleMapAPI/?branch=master)


This component is stated for Nette framework and it simlifies working with a Google map.

Requirements
Expand Down
8 changes: 4 additions & 4 deletions src/MapAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class MapAPI extends Control
const ROADMAP = 'ROADMAP', SATELLITE = 'SATELLITE', HYBRID = 'HYBRID', TERRAIN = 'TERRAIN',
BICYCLING = 'BICYCLING', DRIVING = 'DRIVING', TRANSIT = 'TRANSIT', WALKING = 'WALKING';

/** @var String */
/** @var double|string */
private $width;

/** @var String */
/** @var double|string */
private $height;

/** @var array */
Expand Down Expand Up @@ -103,8 +103,8 @@ public function setCoordinates(array $coordinates)


/**
* @param double $width
* @param double $height
* @param double|string $width
* @param double|string $height
* @return MapAPI
*/
public function setProportions($width, $height)
Expand Down
3 changes: 3 additions & 0 deletions tests/GoogleAPI/MapAPITest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class MapAPITest extends TestCase
{
$this->map->setProportions(150, 300);
Assert::same(['width' => 150, 'height' => 300], $this->map->getProportions());

$this->map->setProportions('150px', '300px');
Assert::same(['width' => '150px', 'height' => '300px'], $this->map->getProportions());
}


Expand Down

0 comments on commit 875358f

Please sign in to comment.